diff options
author | Paul Gilbert | 2016-08-27 13:59:08 -0400 |
---|---|---|
committer | Paul Gilbert | 2016-08-27 13:59:08 -0400 |
commit | f5ab3d1cd9eb3a884b0ab5d0b154a4f9cccc74b7 (patch) | |
tree | 771a8d2b3fddf96c17a1d81d42cb08dfba09d110 /engines/mohawk/dialogs.cpp | |
parent | 873d555add9aaf5eb0d021518f5134142e2c2ff6 (diff) | |
parent | 5ea32efbb0ecb3e6b8336ad3c2edd3905ea5b89a (diff) | |
download | scummvm-rg350-f5ab3d1cd9eb3a884b0ab5d0b154a4f9cccc74b7.tar.gz scummvm-rg350-f5ab3d1cd9eb3a884b0ab5d0b154a4f9cccc74b7.tar.bz2 scummvm-rg350-f5ab3d1cd9eb3a884b0ab5d0b154a4f9cccc74b7.zip |
Merge branch 'master' into xeen
Diffstat (limited to 'engines/mohawk/dialogs.cpp')
-rw-r--r-- | engines/mohawk/dialogs.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/engines/mohawk/dialogs.cpp b/engines/mohawk/dialogs.cpp index 8c11e3a5e9..38be98dfec 100644 --- a/engines/mohawk/dialogs.cpp +++ b/engines/mohawk/dialogs.cpp @@ -92,7 +92,7 @@ enum { MohawkOptionsDialog::MohawkOptionsDialog(MohawkEngine *vm) : GUI::Dialog(0, 0, 360, 200), - _vm(vm) { + _vm(vm), _loadSlot(-1) { _loadButton = new GUI::ButtonWidget(this, 245, 25, 100, 25, _("~L~oad"), 0, kLoadCmd); _saveButton = new GUI::ButtonWidget(this, 245, 60, 100, 25, _("~S~ave"), 0, kSaveCmd); new GUI::ButtonWidget(this, 245, 95, 100, 25, _("~Q~uit"), 0, kQuitCmd); @@ -112,6 +112,7 @@ MohawkOptionsDialog::~MohawkOptionsDialog() { void MohawkOptionsDialog::open() { GUI::Dialog::open(); + _loadSlot = -1; _loadButton->setEnabled(_vm->canLoadGameStateCurrently()); _saveButton->setEnabled(_vm->canSaveGameStateCurrently()); } @@ -133,12 +134,14 @@ void MohawkOptionsDialog::save() { } void MohawkOptionsDialog::load() { - int slot = _loadDialog->runModalWithCurrentTarget(); + // Do not load the game state from insite the dialog loop to + // avoid mouse cursor glitches (see bug #7164). Instead store + // the slot to load and let the code exectuting the dialog do + // the load after the dialog finished running. + _loadSlot = _loadDialog->runModalWithCurrentTarget(); - if (slot >= 0) { - _vm->loadGameState(slot); + if (_loadSlot >= 0) close(); - } } void MohawkOptionsDialog::reflowLayout() { |