From 8e3caf4752877aa40d389dbbc57bded479761579 Mon Sep 17 00:00:00 2001 From: Ian Chua Date: Tue, 19 May 2026 15:05:51 +0800 Subject: [PATCH] show error dialog only once per session --- src/slic3r/GUI/GUI_App.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/slic3r/GUI/GUI_App.cpp b/src/slic3r/GUI/GUI_App.cpp index ca7fe434b3..c61607a0c1 100644 --- a/src/slic3r/GUI/GUI_App.cpp +++ b/src/slic3r/GUI/GUI_App.cpp @@ -4849,11 +4849,12 @@ void GUI_App::on_http_error(wxCommandEvent &evt) return; } + static bool m_show_api_error = false; // Show general error notification for Orca Cloud API failures (not Bambu) if (provider == ORCA_CLOUD_PROVIDER && status >= 400 && code != HttpErrorVersionLimited) { - if (m_show_http_error_msgdlg) + if (m_show_api_error) return; - m_show_http_error_msgdlg = true; + m_show_api_error = true; wxString msg; if (!error.empty()) { @@ -4862,7 +4863,6 @@ void GUI_App::on_http_error(wxCommandEvent &evt) msg = wxString::Format(_L("API error (HTTP %u)"), status); } wxMessageBox(msg, _L("Orca Cloud API Error"), wxOK | wxICON_ERROR, wxGetApp().mainframe); - m_show_http_error_msgdlg = false; } }