mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-08 07:27:41 -06:00
FIX:fixed multiple prompt windows popping up
Change-Id: I7cfc6d1ce08d356dc9c2f7125b46d4e12b95f4e7
This commit is contained in:
parent
fc64864b15
commit
1d16e98e06
2 changed files with 15 additions and 5 deletions
|
@ -1620,8 +1620,13 @@ void StatusPanel::update(MachineObject *obj)
|
|||
if (iter_connect_type->second == "lan" && obj->dev_connection_type == "cloud") {
|
||||
wxString txt = _L("Disconnected from printer [%s] due to LAN mode disabled.Please reconnect the printer by logging in with your user account.");
|
||||
wxString msg = wxString::Format(txt,obj->dev_name);
|
||||
MessageDialog msg_wingow(nullptr, msg, wxEmptyString, wxICON_WARNING | wxOK);
|
||||
msg_wingow.ShowModal();
|
||||
if (!m_show_mode_changed) {
|
||||
m_show_mode_changed = true;
|
||||
MessageDialog msg_wingow(nullptr, msg, wxEmptyString, wxICON_WARNING | wxOK);
|
||||
if (msg_wingow.ShowModal() == wxID_OK || msg_wingow.ShowModal() == wxID_CLOSE) {
|
||||
m_show_mode_changed = false;
|
||||
}
|
||||
}
|
||||
m_print_connect_types[obj->dev_id] = obj->dev_connection_type;
|
||||
}
|
||||
|
||||
|
@ -1629,8 +1634,13 @@ void StatusPanel::update(MachineObject *obj)
|
|||
if (iter_connect_type->second == "cloud" && obj->dev_connection_type == "lan") {
|
||||
wxString txt = _L("Disconnected from printer [%s] due to LAN mode enabled.Please reconnect the printer by inputting Access Code which can be gotten from printer screen.");
|
||||
wxString msg = wxString::Format(txt, obj->dev_name);
|
||||
MessageDialog msg_wingow(nullptr, msg, wxEmptyString, wxICON_WARNING | wxOK);
|
||||
msg_wingow.ShowModal();
|
||||
if (!m_show_mode_changed) {
|
||||
m_show_mode_changed = true;
|
||||
MessageDialog msg_wingow(nullptr, msg, wxEmptyString, wxICON_WARNING | wxOK);
|
||||
if (msg_wingow.ShowModal() == wxID_OK || msg_wingow.ShowModal() == wxID_CLOSE) {
|
||||
m_show_mode_changed = false;
|
||||
}
|
||||
}
|
||||
m_print_connect_types[obj->dev_id] = obj->dev_connection_type;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue