diff options
author | Alexander Tkachev | 2016-07-11 14:24:30 +0600 |
---|---|---|
committer | Alexander Tkachev | 2016-08-24 16:07:55 +0600 |
commit | f01402f4d8cfa5123677708622c4d15e30724b7c (patch) | |
tree | c6e9086e14b4107e6505efb6b4128788ba938484 /gui/downloaddialog.cpp | |
parent | 9975307caf5452b25ad706ca2594239909f2354f (diff) | |
download | scummvm-rg350-f01402f4d8cfa5123677708622c4d15e30724b7c.tar.gz scummvm-rg350-f01402f4d8cfa5123677708622c4d15e30724b7c.tar.bz2 scummvm-rg350-f01402f4d8cfa5123677708622c4d15e30724b7c.zip |
GUI: Remove unnecessary DownloadDialog's flag
Diffstat (limited to 'gui/downloaddialog.cpp')
-rw-r--r-- | gui/downloaddialog.cpp | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/gui/downloaddialog.cpp b/gui/downloaddialog.cpp index 001a058205..1d838f142c 100644 --- a/gui/downloaddialog.cpp +++ b/gui/downloaddialog.cpp @@ -40,7 +40,7 @@ enum { }; DownloadDialog::DownloadDialog(uint32 storageId): - Dialog("GlobalOptions_Cloud_DownloadDialog"), _close(false), _redraw(false) { + Dialog("GlobalOptions_Cloud_DownloadDialog"), _close(false) { _backgroundType = GUI::ThemeEngine::kDialogBackgroundPlain; _browser = new BrowserDialog(_("Select directory where to download game data"), true); @@ -72,6 +72,7 @@ DownloadDialog::~DownloadDialog() { void DownloadDialog::open() { Dialog::open(); + CloudMan.setDownloadTarget(this); if (!CloudMan.isDownloading()) if (!selectDirectories()) close(); @@ -92,10 +93,11 @@ void DownloadDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 dat close(); break; } - case kDownloadProgressCmd: - _percentLabel->setLabel(Common::String::format("%u %%", data)); - _progressBar->setValue(data); - _redraw = true; + case kDownloadProgressCmd: + if (!_close) { + refreshWidgets(); + draw(); + } break; case kDownloadEndedCmd: _close = true; @@ -169,12 +171,6 @@ void DownloadDialog::handleTickle() { return; } - if (_redraw) { - refreshWidgets(); - draw(); - _redraw = false; - } - Dialog::handleTickle(); } |