mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-12 09:17:52 -06: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:
parent
8bb7ea7cfc
commit
478fdbc041
2 changed files with 10 additions and 7 deletions
|
@ -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();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue