aboutsummaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
authorAlexander Tkachev2019-07-19 18:01:09 +0700
committerMatan Bareket2019-07-30 14:51:41 -0400
commita9d47a163ea625782517125f8aa31735039985a0 (patch)
tree410745bca275f152349bf777f2cc5b1a6f6c04c2 /gui
parenta1b847a1ef2ef88ba1ea8c1001cc650dfebcf5a2 (diff)
downloadscummvm-rg350-a9d47a163ea625782517125f8aa31735039985a0.tar.gz
scummvm-rg350-a9d47a163ea625782517125f8aa31735039985a0.tar.bz2
scummvm-rg350-a9d47a163ea625782517125f8aa31735039985a0.zip
GUI: Fix Cloud tab scrolling problem
GlobalOptionsDialog is now also a CommandSender, so it could send command "scroll to the top" when storage is disconnected in Cloud tab (layout updates, that's why scrolling is needed).
Diffstat (limited to 'gui')
-rw-r--r--gui/options.cpp4
-rw-r--r--gui/options.h2
2 files changed, 4 insertions, 2 deletions
diff --git a/gui/options.cpp b/gui/options.cpp
index 7caef1f885..f7c9f60023 100644
--- a/gui/options.cpp
+++ b/gui/options.cpp
@@ -1447,7 +1447,7 @@ void OptionsDialog::setupGraphicsTab() {
GlobalOptionsDialog::GlobalOptionsDialog(LauncherDialog *launcher)
- : OptionsDialog(Common::ConfigManager::kApplicationDomain, "GlobalOptions"), _launcher(launcher) {
+ : OptionsDialog(Common::ConfigManager::kApplicationDomain, "GlobalOptions"), CommandSender(nullptr), _launcher(launcher) {
#ifdef GUI_ENABLE_KEYSDIALOG
_keysDialog = 0;
#endif
@@ -1755,6 +1755,7 @@ void GlobalOptionsDialog::build() {
ScrollContainerWidget *container = new ScrollContainerWidget(tab, "GlobalOptions_Cloud.Container", kCloudTabContainerReflowCmd);
container->setTarget(this);
container->setBackgroundType(ThemeEngine::kDialogBackgroundNone);
+ setTarget(container);
addCloudControls(container, "GlobalOptions_Cloud_Container.", context);
#endif USE_LIBCURL
@@ -2329,6 +2330,7 @@ void GlobalOptionsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint3
CloudMan.disconnectStorage(_selectedStorageIndex);
_redrawCloudTab = true;
+ sendCommand(kSetPositionCmd, 0);
break;
}
#endif // USE_LIBCURL
diff --git a/gui/options.h b/gui/options.h
index c10dcca77c..fe9c93c411 100644
--- a/gui/options.h
+++ b/gui/options.h
@@ -237,7 +237,7 @@ protected:
};
-class GlobalOptionsDialog : public OptionsDialog {
+class GlobalOptionsDialog : public OptionsDialog, public CommandSender {
public:
GlobalOptionsDialog(LauncherDialog *launcher);
~GlobalOptionsDialog();