mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-24 21:21:05 +00:00
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.
This commit is contained in:
parent
c9f90b23ce
commit
f7efd3cd7f
@ -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
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user