mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-20 03:43:52 +00:00
show error dialog only once per session
This commit is contained in:
@@ -4849,11 +4849,12 @@ void GUI_App::on_http_error(wxCommandEvent &evt)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static bool m_show_api_error = false;
|
||||||
// Show general error notification for Orca Cloud API failures (not Bambu)
|
// Show general error notification for Orca Cloud API failures (not Bambu)
|
||||||
if (provider == ORCA_CLOUD_PROVIDER && status >= 400 && code != HttpErrorVersionLimited) {
|
if (provider == ORCA_CLOUD_PROVIDER && status >= 400 && code != HttpErrorVersionLimited) {
|
||||||
if (m_show_http_error_msgdlg)
|
if (m_show_api_error)
|
||||||
return;
|
return;
|
||||||
m_show_http_error_msgdlg = true;
|
m_show_api_error = true;
|
||||||
|
|
||||||
wxString msg;
|
wxString msg;
|
||||||
if (!error.empty()) {
|
if (!error.empty()) {
|
||||||
@@ -4862,7 +4863,6 @@ void GUI_App::on_http_error(wxCommandEvent &evt)
|
|||||||
msg = wxString::Format(_L("API error (HTTP %u)"), status);
|
msg = wxString::Format(_L("API error (HTTP %u)"), status);
|
||||||
}
|
}
|
||||||
wxMessageBox(msg, _L("Orca Cloud API Error"), wxOK | wxICON_ERROR, wxGetApp().mainframe);
|
wxMessageBox(msg, _L("Orca Cloud API Error"), wxOK | wxICON_ERROR, wxGetApp().mainframe);
|
||||||
m_show_http_error_msgdlg = false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user