[Scummvm-git-logs] scummvm master -> f7efd3cd7f56a8e9d12c2851e127e4edf13bd0d1

bgK bastien.bouclet at gmail.com
Sat Apr 11 06:18:42 UTC 2020


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:
f7efd3cd7f GUI: Fix error when renaming a target in the edit game dialog


Commit: f7efd3cd7f56a8e9d12c2851e127e4edf13bd0d1
    https://github.com/scummvm/scummvm/commit/f7efd3cd7f56a8e9d12c2851e127e4edf13bd0d1
Author: Bastien Bouclet (bastien.bouclet at gmail.com)
Date: 2020-04-11T08:16:21+02:00

Commit Message:
GUI: Fix error when renaming a target in the edit game dialog

The OptionsContainerWidget keeps a copy of the name of the game domain
that needs to be updated when the target is renamed.

Ideally, OptionsContainerWidget would simply keep a pointer to the
ConfigurationManager::Domain object, however that's not currently
possible as the ConfigurationManager defaults are global instead of
being per domain. As a result they are not accessible from the Domain
object.

Fixes #11416.

Changed paths:
    gui/editgamedialog.cpp
    gui/widget.h


diff --git a/gui/editgamedialog.cpp b/gui/editgamedialog.cpp
index 2aa6ec3d86..78219a51c9 100644
--- a/gui/editgamedialog.cpp
+++ b/gui/editgamedialog.cpp
@@ -584,6 +584,9 @@ void EditGameDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 dat
 			}
 			ConfMan.renameGameDomain(_domain, newDomain);
 			_domain = newDomain;
+			if (_engineOptions) {
+				_engineOptions->setDomain(newDomain);
+			}
 		}
 	}
 	// fall through
diff --git a/gui/widget.h b/gui/widget.h
index 52bc71cb54..61e02fd227 100644
--- a/gui/widget.h
+++ b/gui/widget.h
@@ -471,6 +471,7 @@ public:
 	virtual bool save() = 0;
 
 	void setParentDialog(Dialog *parentDialog) { _parentDialog = parentDialog; }
+	void setDomain(const Common::String &domain) { _domain = domain; }
 
 protected:
 	enum {
@@ -495,7 +496,7 @@ protected:
 	 */
 	virtual void defineLayout(ThemeEval &layouts, const Common::String &layoutName, const Common::String &overlayedLayout) const {}
 
-	const Common::String _domain;
+	Common::String _domain;
 	const Common::String _dialogLayout;
 
 	Dialog *_parentDialog;




More information about the Scummvm-git-logs mailing list