Fix for #7419 - Non-modal settings window loses focus after accepting dialog (MSW specific issue)

MessageDialog is used instead of wxMessageDialog on MSW for supporting of the Light/Dark color mode.
But a constructor of the MsgDialog replaces a parent which is equal to nullptr with the MainFrame .
That is why non-modal dialog with Preset Settings loses a focus after close of the MessageDialog.

"m_msg_dlg_parent" is added to ConfigManipulation class. ConfigManipulation's instance owed by Tab will use the Tab as a parent for MessageDialogs.
=> The MessageDialog with information about configuration incompatibility will always appear over related SettingsTab
and a non-modal dialog with Preset Settings will not lose the focus.
This commit is contained in:
YuSanka 2021-12-06 11:39:28 +01:00
parent c7a4f61238
commit f5dc746e94
3 changed files with 14 additions and 19 deletions

View file

@ -4481,7 +4481,7 @@ ConfigManipulation Tab::get_config_manipulation()
return on_value_change(opt_key, value);
};
return ConfigManipulation(load_config, cb_toggle_field, cb_value_change);
return ConfigManipulation(load_config, cb_toggle_field, cb_value_change, nullptr, this);
}