diff options
author | Torbjörn Andersson | 2009-01-12 19:56:08 +0000 |
---|---|---|
committer | Torbjörn Andersson | 2009-01-12 19:56:08 +0000 |
commit | cfdb824535a204a6ee1853dd801cad9a2eac92aa (patch) | |
tree | 8e2ef014810d70d5373f358fd9a3b69cef4b776d /gui | |
parent | e1f808832818340e9c6614f878d9524f533f65cc (diff) | |
download | scummvm-rg350-cfdb824535a204a6ee1853dd801cad9a2eac92aa.tar.gz scummvm-rg350-cfdb824535a204a6ee1853dd801cad9a2eac92aa.tar.bz2 scummvm-rg350-cfdb824535a204a6ee1853dd801cad9a2eac92aa.zip |
Fixed bug #2500168 ("GUI: Cannot quit in the launcher's load dialog"). I thought
I would have to do more than this to fix it, but it seems to be enough.
svn-id: r35840
Diffstat (limited to 'gui')
-rw-r--r-- | gui/saveload.cpp | 8 | ||||
-rw-r--r-- | gui/saveload.h | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/gui/saveload.cpp b/gui/saveload.cpp index 29b63a0415..21be09d99e 100644 --- a/gui/saveload.cpp +++ b/gui/saveload.cpp @@ -105,6 +105,14 @@ int SaveLoadChooser::runModal(const EnginePlugin *plugin, const String &target) return ret; } +void SaveLoadChooser::open() { + Dialog::open(); + + // So that quitting ScummVM will not cause the dialog result to say a + // savegame was selected. + setResult(-1); +} + const Common::String &SaveLoadChooser::getResultString() const { return (_list->getSelected() > -1) ? _list->getSelectedString() : _resultString; } diff --git a/gui/saveload.h b/gui/saveload.h index 1f9d2d8c75..d1f58b1f59 100644 --- a/gui/saveload.h +++ b/gui/saveload.h @@ -67,6 +67,7 @@ public: virtual void handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data); void setList(const StringList& list); int runModal(const EnginePlugin *plugin, const String &target); + void open(); const Common::String &getResultString() const; void setSaveMode(bool saveMode); |