parent
abcf7bf2de
commit
e80cdab64b
3 changed files with 4 additions and 1 deletions
|
@ -380,6 +380,8 @@ void ListWidget::startEditMode() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void ListWidget::endEditMode() {
|
void ListWidget::endEditMode() {
|
||||||
|
if(!_editMode)
|
||||||
|
return;
|
||||||
// send a message that editing finished with a return/enter key press
|
// send a message that editing finished with a return/enter key press
|
||||||
_editMode = false;
|
_editMode = false;
|
||||||
_list[_selectedItem] = _editString;
|
_list[_selectedItem] = _editString;
|
||||||
|
|
|
@ -86,6 +86,7 @@ public:
|
||||||
|
|
||||||
// Made startEditMode for SCUMM's SaveLoadChooser
|
// Made startEditMode for SCUMM's SaveLoadChooser
|
||||||
void startEditMode();
|
void startEditMode();
|
||||||
|
void endEditMode();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void drawWidget(bool hilite);
|
void drawWidget(bool hilite);
|
||||||
|
@ -93,7 +94,6 @@ protected:
|
||||||
int findItem(int x, int y) const;
|
int findItem(int x, int y) const;
|
||||||
void scrollBarRecalc();
|
void scrollBarRecalc();
|
||||||
|
|
||||||
void endEditMode();
|
|
||||||
void abortEditMode();
|
void abortEditMode();
|
||||||
|
|
||||||
Common::Rect getEditRect() const;
|
Common::Rect getEditRect() const;
|
||||||
|
|
|
@ -53,6 +53,7 @@ void ChooserDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data
|
||||||
switch (cmd) {
|
switch (cmd) {
|
||||||
case kChooseCmd:
|
case kChooseCmd:
|
||||||
case kListItemDoubleClickedCmd:
|
case kListItemDoubleClickedCmd:
|
||||||
|
_list->endEditMode();
|
||||||
setResult(item);
|
setResult(item);
|
||||||
close();
|
close();
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue