CLOUD: Fix SaveLoadCloudSyncProgressDialog crash
It's closing itself a bit later now.
This commit is contained in:
parent
e9721976aa
commit
3db80154d6
2 changed files with 13 additions and 3 deletions
|
@ -46,7 +46,7 @@ enum {
|
|||
kBackgroundSyncCmd = 'PDBS'
|
||||
};
|
||||
|
||||
SaveLoadCloudSyncProgressDialog::SaveLoadCloudSyncProgressDialog(): Dialog(10, 10, 320, 100) {
|
||||
SaveLoadCloudSyncProgressDialog::SaveLoadCloudSyncProgressDialog(): Dialog(10, 10, 320, 100), _close(false) {
|
||||
int x = 10;
|
||||
int buttonHeight = 24;
|
||||
int buttonWidth = 140;
|
||||
|
@ -77,14 +77,22 @@ void SaveLoadCloudSyncProgressDialog::handleCommand(CommandSender *sender, uint3
|
|||
|
||||
case kSavesSyncEndedCmd:
|
||||
case kBackgroundSyncCmd:
|
||||
setResult(kBackgroundSyncCmd);
|
||||
close();
|
||||
_close = true;
|
||||
break;
|
||||
}
|
||||
|
||||
Dialog::handleCommand(sender, cmd, data);
|
||||
}
|
||||
|
||||
void SaveLoadCloudSyncProgressDialog::handleTickle() {
|
||||
if (_close) {
|
||||
setResult(kBackgroundSyncCmd);
|
||||
close();
|
||||
}
|
||||
|
||||
Dialog::handleTickle();
|
||||
}
|
||||
|
||||
#ifndef DISABLE_SAVELOADCHOOSER_GRID
|
||||
SaveLoadChooserType getRequestedSaveLoadDialog(const MetaEngine &metaEngine) {
|
||||
const Common::String &userConfig = ConfMan.get("gui_saveload_chooser", Common::ConfigManager::kApplicationDomain);
|
||||
|
|
|
@ -32,11 +32,13 @@ namespace GUI {
|
|||
|
||||
class SaveLoadCloudSyncProgressDialog : public Dialog { //protected?
|
||||
StaticTextWidget *_label;
|
||||
bool _close;
|
||||
public:
|
||||
SaveLoadCloudSyncProgressDialog();
|
||||
virtual ~SaveLoadCloudSyncProgressDialog();
|
||||
|
||||
virtual void handleCommand(CommandSender *sender, uint32 cmd, uint32 data);
|
||||
virtual void handleTickle();
|
||||
};
|
||||
|
||||
#define kSwitchSaveLoadDialog -2
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue