mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-07 23:17:35 -06:00
ENH:fixed info dialog popping up many times
Change-Id: I2016bc9b722601d153d35ddfbbc4c287bd37f9a1
This commit is contained in:
parent
d6b11a676e
commit
d446db4869
3 changed files with 27 additions and 8 deletions
|
@ -2558,11 +2558,10 @@ bool GUI_App::on_init_inner()
|
|||
Bind(EVT_SHOW_DIALOG, [this](const wxCommandEvent& evt) {
|
||||
wxString msg = evt.GetString();
|
||||
InfoDialog dlg(this->mainframe, _L("Info"), msg);
|
||||
dlg.Bind(wxEVT_DESTROY, [this](auto& e) {
|
||||
m_info_dialog_content = wxEmptyString;
|
||||
});
|
||||
dlg.ShowModal();
|
||||
|
||||
/*wxString text = evt.GetString();
|
||||
Slic3r::GUI::MessageDialog msg_dlg(this->mainframe, text, "", wxAPPLY | wxOK);
|
||||
msg_dlg.ShowModal();*/
|
||||
});
|
||||
}
|
||||
else {
|
||||
|
@ -4489,9 +4488,12 @@ std::string GUI_App::format_display_version()
|
|||
|
||||
void GUI_App::show_dialog(wxString msg)
|
||||
{
|
||||
wxCommandEvent* evt = new wxCommandEvent(EVT_SHOW_DIALOG);
|
||||
evt->SetString(msg);
|
||||
GUI::wxGetApp().QueueEvent(evt);
|
||||
if (m_info_dialog_content.empty()) {
|
||||
wxCommandEvent* evt = new wxCommandEvent(EVT_SHOW_DIALOG);
|
||||
evt->SetString(msg);
|
||||
GUI::wxGetApp().QueueEvent(evt);
|
||||
m_info_dialog_content = msg;
|
||||
}
|
||||
}
|
||||
|
||||
void GUI_App::reload_settings()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue