[Scummvm-git-logs] scummvm master -> 782cd55c31cef7adb5c235bed6bf24bbf606ec9d

SupSuper supsuper at gmail.com
Wed Jul 28 08:37:37 UTC 2021


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
782cd55c31 GUI: Fix RTL Add Game dialog leaving UI in a broken state (#12765)


Commit: 782cd55c31cef7adb5c235bed6bf24bbf606ec9d
    https://github.com/scummvm/scummvm/commit/782cd55c31cef7adb5c235bed6bf24bbf606ec9d
Author: SupSuper (supsuper at gmail.com)
Date: 2021-07-28T09:37:25+01:00

Commit Message:
GUI: Fix RTL Add Game dialog leaving UI in a broken state (#12765)

Make sure we clear all RTL dialog paddings once we go back to the launcher.

Changed paths:
    gui/gui-manager.cpp
    gui/options.cpp


diff --git a/gui/gui-manager.cpp b/gui/gui-manager.cpp
index b19e869094..42bac4e631 100644
--- a/gui/gui-manager.cpp
+++ b/gui/gui-manager.cpp
@@ -290,6 +290,11 @@ void GuiManager::redraw() {
 	if (_redrawStatus == kRedrawOpenDialog && _dialogStack.size() > 2)
 		shading = ThemeEngine::kShadingNone;
 
+	// Reset any custom RTL paddings set by stacked dialogs when we go back to the top
+	if (useRTL() && _dialogStack.size() == 1) {
+		setDialogPaddings(0, 0);
+	}
+
 	switch (_redrawStatus) {
 		case kRedrawCloseDialog:
 		case kRedrawFull:
diff --git a/gui/options.cpp b/gui/options.cpp
index 3c84708ba7..a3e28d6a6b 100644
--- a/gui/options.cpp
+++ b/gui/options.cpp
@@ -161,10 +161,6 @@ OptionsDialog::OptionsDialog(const Common::String &domain, const Common::String
 
 OptionsDialog::~OptionsDialog() {
 	delete _subToggleGroup;
-	if (g_gui.useRTL()) {
-		g_gui.setDialogPaddings(0, 0);
-		g_gui.scheduleTopDialogRedraw();
-	}
 }
 
 void OptionsDialog::init() {




More information about the Scummvm-git-logs mailing list