mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-08 07:27:41 -06:00
FIX:fixed display conflict between speed popup and humidity popup
Change-Id: Ib344aa829d3172e29a5d58a7b7f3b5d2d7d6c9a1
This commit is contained in:
parent
78b6e75955
commit
ddf8c216c6
3 changed files with 20 additions and 4 deletions
|
@ -2879,15 +2879,29 @@ void StatusPanel::on_switch_speed(wxCommandEvent &event)
|
|||
obj->command_set_printing_speed((PrintingSpeedLevel)this->speed_lvl);
|
||||
}
|
||||
});
|
||||
popUp->Bind(wxEVT_SHOW, [this](auto &e) {
|
||||
popUp->Bind(wxEVT_SHOW, [this, popUp](auto &e) {
|
||||
if (!e.IsShown()) {
|
||||
wxGetApp().CallAfter([popUp = e.GetEventObject()] { delete popUp; });
|
||||
/* wxGetApp().CallAfter([this, popUp] {
|
||||
|
||||
});*/
|
||||
popUp->Destroy();
|
||||
m_showing_speed_popup = false;
|
||||
speed_dismiss_time = boost::posix_time::microsec_clock::universal_time();
|
||||
}
|
||||
});
|
||||
|
||||
m_ams_control->Bind(EVT_AMS_SHOW_HUMIDITY_TIPS, [this, popUp](auto& e) {
|
||||
if (m_showing_speed_popup) {
|
||||
if (popUp && popUp->IsShown()) {
|
||||
popUp->Show(false);
|
||||
}
|
||||
}
|
||||
e.Skip();
|
||||
});
|
||||
wxPoint pos = m_switch_speed->ClientToScreen(wxPoint(0, -6));
|
||||
popUp->Position(pos, {0, m_switch_speed->GetSize().y + 12});
|
||||
popUp->Popup();
|
||||
m_showing_speed_popup = true;
|
||||
}
|
||||
|
||||
void StatusPanel::on_printing_fan_switch(wxCommandEvent &event)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue