GUI: Fix crash with ExtraGuiOptionsDialog

This commit is contained in:
Cameron Cawley 2024-06-14 20:28:39 +01:00 committed by Eugene Sandulenko
parent ec3589c113
commit ebb76cb401
2 changed files with 1 additions and 11 deletions

View File

@ -414,7 +414,7 @@ void ConfigDialog::apply() {
}
ExtraGuiOptionsWidget::ExtraGuiOptionsWidget(GuiObject *containerBoss, const Common::String &name, const Common::String &domain, const ExtraGuiOptions &options) :
OptionsContainerWidget(containerBoss, name, dialogLayout(domain), domain),
OptionsContainerWidget(containerBoss, name, "ExtraGuiOptionsDialog", domain),
_options(options) {
for (uint i = 0; i < _options.size(); i++) {
@ -461,14 +461,6 @@ void ExtraGuiOptionsWidget::handleCommand(GUI::CommandSender *sender, uint32 cmd
}
}
Common::String ExtraGuiOptionsWidget::dialogLayout(const Common::String &domain) {
if (ConfMan.getActiveDomainName().equals(domain)) {
return "GlobalConfig_Engine_Container";
} else {
return "GameOptions_Game_Container";
}
}
void ExtraGuiOptionsWidget::load() {
// Set the state of engine-specific checkboxes
for (uint j = 0; j < _options.size() && j < _checkboxes.size(); ++j) {

View File

@ -112,8 +112,6 @@ protected:
private:
typedef Common::Array<CheckboxWidget *> CheckboxWidgetList;
static Common::String dialogLayout(const Common::String &domain);
ExtraGuiOptions _options;
CheckboxWidgetList _checkboxes;
};