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:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user