ENH:display msg dialog once
jira:[for http error msg] Change-Id: I12e9c155fdb567cac99c35b6feeef650269ba75d
This commit is contained in:
parent
1d41b0a7a7
commit
4fef36e04a
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue