FIX:fixed speed control window will not dismiss

Change-Id: I7d053936fd13b08f624f7e1488fcc79d9a270f53
This commit is contained in:
tao wang 2023-04-06 20:05:58 +08:00 committed by Lane.Wei
parent e2b8bff660
commit eb86b00c82
3 changed files with 24 additions and 8 deletions

View file

@ -3058,16 +3058,13 @@ void StatusPanel::on_switch_speed(wxCommandEvent &event)
});
popUp->Bind(wxEVT_SHOW, [this, popUp](auto &e) {
if (!e.IsShown()) {
/* 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) {
m_ams_control->Bind(EVT_CLEAR_SPEED_CONTROL, [this, popUp](auto& e) {
if (m_showing_speed_popup) {
if (popUp && popUp->IsShown()) {
popUp->Show(false);