diff --git a/src/slic3r/GUI/GUI_App.cpp b/src/slic3r/GUI/GUI_App.cpp index 288553e9b..f2c51fa46 100644 --- a/src/slic3r/GUI/GUI_App.cpp +++ b/src/slic3r/GUI/GUI_App.cpp @@ -4074,10 +4074,16 @@ void GUI_App::on_http_error(wxCommandEvent &evt) // Version limit if (code == HttpErrorVersionLimited) { - MessageDialog msg_dlg(nullptr, _L("The version of Bambu studio is too low and needs to be updated to the latest version before it can be used normally"), "", wxAPPLY | wxOK); - if (msg_dlg.ShowModal() == wxOK) { - return; + if (!m_show_http_errpr_msgdlg) { + MessageDialog msg_dlg(nullptr, _L("The version of Bambu studio is too low and needs to be updated to the latest version before it can be used normally"), "", wxAPPLY | wxOK); + m_show_http_errpr_msgdlg = true; + auto modal_result = msg_dlg.ShowModal(); + if (modal_result == wxOK || modal_result == wxCLOSE) { + m_show_http_errpr_msgdlg = false; + return; + } } + } // request login @@ -4085,9 +4091,15 @@ void GUI_App::on_http_error(wxCommandEvent &evt) if (m_agent) { if (m_agent->is_user_login()) { this->request_user_logout(); - MessageDialog msg_dlg(nullptr, _L("Login information expired. Please login again."), "", wxAPPLY | wxOK); - if (msg_dlg.ShowModal() == wxOK) { - return; + + if (!m_show_http_errpr_msgdlg) { + MessageDialog msg_dlg(nullptr, _L("Login information expired. Please login again."), "", wxAPPLY | wxOK); + m_show_http_errpr_msgdlg = true; + auto modal_result = msg_dlg.ShowModal(); + if (modal_result == wxOK || modal_result == wxCLOSE) { + m_show_http_errpr_msgdlg = false; + return; + } } } } diff --git a/src/slic3r/GUI/GUI_App.hpp b/src/slic3r/GUI/GUI_App.hpp index 9806bc0f4..28d8eb298 100644 --- a/src/slic3r/GUI/GUI_App.hpp +++ b/src/slic3r/GUI/GUI_App.hpp @@ -293,6 +293,7 @@ private: bool m_is_dark_mode{ false }; bool m_adding_script_handler { false }; bool m_side_popup_status{false}; + bool m_show_http_errpr_msgdlg{false}; wxString m_info_dialog_content; HttpServer m_http_server;