[Scummvm-cvs-logs] CVS: scummvm/gui chooser.cpp,1.13,1.14 ListWidget.cpp,1.44,1.45 ListWidget.h,1.27,1.28

Max Horn fingolfin at users.sourceforge.net
Sun Mar 27 03:27:31 CEST 2005


Update of /cvsroot/scummvm/scummvm/gui
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32662/gui

Modified Files:
	chooser.cpp ListWidget.cpp ListWidget.h 
Log Message:
Patch #1171300: ListWidget + Chooser Patch

Index: chooser.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/chooser.cpp,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- chooser.cpp	1 Jan 2005 16:09:06 -0000	1.13
+++ chooser.cpp	27 Mar 2005 11:27:07 -0000	1.14
@@ -53,6 +53,7 @@
 	switch (cmd) {
 	case kChooseCmd:
 	case kListItemDoubleClickedCmd:
+		_list->endEditMode();
 		setResult(item);
 		close();
 		break;

Index: ListWidget.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/ListWidget.cpp,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -d -r1.44 -r1.45
--- ListWidget.cpp	12 Mar 2005 15:29:16 -0000	1.44
+++ ListWidget.cpp	27 Mar 2005 11:27:07 -0000	1.45
@@ -380,6 +380,8 @@
 }
 
 void ListWidget::endEditMode() {
+	if(!_editMode)
+		return;
 	// send a message that editing finished with a return/enter key press
 	_editMode = false;
 	_list[_selectedItem] = _editString;

Index: ListWidget.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/ListWidget.h,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- ListWidget.h	12 Mar 2005 15:29:16 -0000	1.27
+++ ListWidget.h	27 Mar 2005 11:27:07 -0000	1.28
@@ -86,6 +86,7 @@
 
 	// Made startEditMode for SCUMM's SaveLoadChooser
 	void startEditMode();
+	void endEditMode();
 
 protected:
 	void drawWidget(bool hilite);
@@ -93,7 +94,6 @@
 	int findItem(int x, int y) const;
 	void scrollBarRecalc();
 
-	void endEditMode();
 	void abortEditMode();
 	
 	Common::Rect getEditRect() const;





More information about the Scummvm-git-logs mailing list