FIX:fixed fixed crash when started on macos

Change-Id: Ic09a1fb61f68dffabdaf61b4c9e88bac62094a52
This commit is contained in:
tao wang 2022-12-01 20:35:01 +08:00 committed by Lane.Wei
parent f245e8c0c0
commit 1c919977b1
2 changed files with 9 additions and 2 deletions

View File

@ -476,8 +476,14 @@ DPIFrame(NULL, wxID_ANY, "", wxDefaultPosition, wxDefaultSize, BORDERLESS_FRAME_
});
#endif
wxGetApp().persist_window_geometry(this, true);
wxGetApp().persist_window_geometry(&m_settings_dialog, true);
Bind(wxEVT_SHOW, [this](auto& e) {
if (!m_reset_position) {
wxGetApp().persist_window_geometry(this, true);
wxGetApp().persist_window_geometry(&m_settings_dialog, true);
m_reset_position = true;
}
});
update_ui_from_settings(); // FIXME (?)

View File

@ -83,6 +83,7 @@ protected:
class MainFrame : public DPIFrame
{
bool m_reset_position{false};
bool m_loaded {false};
wxTimer* m_reset_title_text_colour_timer{ nullptr };