mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-16 10:02:12 +00:00
ENH:prevent 500 error pop from popping up multiple times
jira:[for 500 err] Change-Id: I81c74e75ebaeb3fdc18d0fb34a63205e2be06878 (cherry picked from commit 2fcc7f826482644496db25e096f11334b7e539bf)
This commit is contained in:
@@ -1572,13 +1572,17 @@ void GUI_App::init_networking_callbacks()
|
||||
// });
|
||||
|
||||
m_agent->set_server_callback([this](std::string url, int status) {
|
||||
if (!m_server_error_dialog) {
|
||||
m_server_error_dialog = new NetworkErrorDialog(mainframe);
|
||||
}
|
||||
|
||||
if (!m_server_error_dialog->IsShown()) {
|
||||
CallAfter([this]() {
|
||||
if (m_server_error_dialog) {
|
||||
m_server_error_dialog->EndModal(wxCLOSE);
|
||||
m_server_error_dialog->Destroy();
|
||||
m_server_error_dialog = nullptr;
|
||||
}
|
||||
|
||||
m_server_error_dialog = new NetworkErrorDialog(mainframe);
|
||||
m_server_error_dialog->ShowModal();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user