FIX:fixed the mall system dialog not being destroyed

Change-Id: Ie453bdbb41e59da69987e24a7c2d5cc9f378aee4
This commit is contained in:
tao wang 2022-11-09 10:10:37 +08:00 committed by Lane.Wei
parent 7f3d9a8edd
commit 0320872e4e
3 changed files with 17 additions and 0 deletions

View File

@ -4950,6 +4950,20 @@ void GUI_App::open_publish_page_dialog()
} }
} }
void GUI_App::remove_mall_system_dialog()
{
if (m_mall_publish_dialog != nullptr) {
m_mall_publish_dialog->Destroy();
delete m_mall_publish_dialog;
}
if (m_mall_home_dialog != nullptr) {
m_mall_home_dialog->Destroy();
delete m_mall_home_dialog;
}
}
void GUI_App::run_script(wxString js) void GUI_App::run_script(wxString js)
{ {
if (mainframe) if (mainframe)

View File

@ -473,6 +473,7 @@ public:
void load_url(wxString url); void load_url(wxString url);
void open_mall_page_dialog(); void open_mall_page_dialog();
void open_publish_page_dialog(); void open_publish_page_dialog();
void remove_mall_system_dialog();
void run_script(wxString js); void run_script(wxString js);
bool is_adding_script_handler() { return m_adding_script_handler; } bool is_adding_script_handler() { return m_adding_script_handler; }
void set_adding_script_handler(bool status) { m_adding_script_handler = status; } void set_adding_script_handler(bool status) { m_adding_script_handler = status; }

View File

@ -449,6 +449,8 @@ DPIFrame(NULL, wxID_ANY, "", wxDefaultPosition, wxDefaultSize, BORDERLESS_FRAME_
m_plater->reset(); m_plater->reset();
this->shutdown(); this->shutdown();
// propagate event // propagate event
wxGetApp().remove_mall_system_dialog();
event.Skip(); event.Skip();
BOOST_LOG_TRIVIAL(info) << __FUNCTION__<< ": mainframe finished process close_widow event"; BOOST_LOG_TRIVIAL(info) << __FUNCTION__<< ": mainframe finished process close_widow event";
}); });