FIX: [STUDIO-1589] restore pos of mainframe before show

Change-Id: I73f73597a939f8e65ff8cc5ce9a98741f62c48c3
This commit is contained in:
chunmao.guo 2022-12-05 19:39:40 +08:00 committed by Lane.Wei
parent c3398a089c
commit a4cffa3c87
2 changed files with 3 additions and 11 deletions

View File

@ -474,16 +474,7 @@ DPIFrame(NULL, wxID_ANY, "", wxDefaultPosition, wxDefaultSize, BORDERLESS_FRAME_
wxGetApp().plater()->get_current_canvas3D()->request_extra_frame();
event.Skip();
});
#endif
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;
}
});
#endif
update_ui_from_settings(); // FIXME (?)
@ -565,6 +556,8 @@ DPIFrame(NULL, wxID_ANY, "", wxDefaultPosition, wxDefaultSize, BORDERLESS_FRAME_
wxGetApp().UpdateDarkUIWin(this);
#endif // _MSW_DARK_MODE
wxGetApp().persist_window_geometry(this, true);
wxGetApp().persist_window_geometry(&m_settings_dialog, true);
}
#ifdef __WIN32__

View File

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