diff options
author | Max Horn | 2005-03-27 11:27:07 +0000 |
---|---|---|
committer | Max Horn | 2005-03-27 11:27:07 +0000 |
commit | e80cdab64bc7f26a1be67d72e0b0028d767adbe8 (patch) | |
tree | 8dd8f88a54b944012a84f15782e273ae400b52bf | |
parent | abcf7bf2de88c3926843fa3fd613e50f5ea63cd5 (diff) | |
download | scummvm-rg350-e80cdab64bc7f26a1be67d72e0b0028d767adbe8.tar.gz scummvm-rg350-e80cdab64bc7f26a1be67d72e0b0028d767adbe8.tar.bz2 scummvm-rg350-e80cdab64bc7f26a1be67d72e0b0028d767adbe8.zip |
Patch #1171300: ListWidget + Chooser Patch
svn-id: r17260
-rw-r--r-- | gui/ListWidget.cpp | 2 | ||||
-rw-r--r-- | gui/ListWidget.h | 2 | ||||
-rw-r--r-- | gui/chooser.cpp | 1 |
3 files changed, 4 insertions, 1 deletions
diff --git a/gui/ListWidget.cpp b/gui/ListWidget.cpp index f4a0a81e84..d2229a31f3 100644 --- a/gui/ListWidget.cpp +++ b/gui/ListWidget.cpp @@ -380,6 +380,8 @@ void ListWidget::startEditMode() { } void ListWidget::endEditMode() { + if(!_editMode) + return; // send a message that editing finished with a return/enter key press _editMode = false; _list[_selectedItem] = _editString; diff --git a/gui/ListWidget.h b/gui/ListWidget.h index 36ce8150c0..6d36fc4502 100644 --- a/gui/ListWidget.h +++ b/gui/ListWidget.h @@ -86,6 +86,7 @@ public: // Made startEditMode for SCUMM's SaveLoadChooser void startEditMode(); + void endEditMode(); protected: void drawWidget(bool hilite); @@ -93,7 +94,6 @@ protected: int findItem(int x, int y) const; void scrollBarRecalc(); - void endEditMode(); void abortEditMode(); Common::Rect getEditRect() const; diff --git a/gui/chooser.cpp b/gui/chooser.cpp index e1a8184f7f..429d60b171 100644 --- a/gui/chooser.cpp +++ b/gui/chooser.cpp @@ -53,6 +53,7 @@ void ChooserDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data switch (cmd) { case kChooseCmd: case kListItemDoubleClickedCmd: + _list->endEditMode(); setResult(item); close(); break; |