Patch #1171300: ListWidget + Chooser Patch

svn-id: r17260
This commit is contained in:
Max Horn 2005-03-27 11:27:07 +00:00
parent abcf7bf2de
commit e80cdab64b
3 changed files with 4 additions and 1 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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;