REF: remove useless codes

jira: [none]
Change-Id: I86202fdaa09c5953d9bb4f21cc6dd9d9609c0a7f
(cherry picked from commit e9d8a6c8352628e3f7bb33e2ffaa38e03ebe929b)
This commit is contained in:
xin.zhang
2025-05-08 20:57:35 +08:00
committed by Noisyfox
parent e4c98a69b9
commit e9b30443c5
4 changed files with 1 additions and 26 deletions

View File

@@ -4855,23 +4855,13 @@ void StatusPanel::on_switch_speed(wxCommandEvent &event)
popUp->Bind(wxEVT_SHOW, [this, popUp](auto &e) {
if (!e.IsShown()) {
popUp->Destroy();
m_showing_speed_popup = false;
speed_dismiss_time = boost::posix_time::microsec_clock::universal_time();
}
});
m_ams_control->Bind(EVT_CLEAR_SPEED_CONTROL, [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)

View File

@@ -630,7 +630,6 @@ protected:
int speed_lvl = 1; // 0 - 3
int speed_lvl_timeout {0};
boost::posix_time::ptime speed_dismiss_time;
bool m_showing_speed_popup = false;
bool m_show_mode_changed = false;
std::map<wxString, wxImage> img_list; // key: url, value: wxBitmap png Image
std::map<std::string, std::string> m_print_connect_types;

View File

@@ -34,7 +34,6 @@ namespace Slic3r { namespace GUI {
wxDEFINE_EVENT(EVT_AMS_RETRY, wxCommandEvent);
wxDEFINE_EVENT(EVT_AMS_SHOW_HUMIDITY_TIPS, wxCommandEvent);
wxDEFINE_EVENT(EVT_AMS_UNSELETED_VAMS, wxCommandEvent);
wxDEFINE_EVENT(EVT_CLEAR_SPEED_CONTROL, wxCommandEvent);
wxDEFINE_EVENT(EVT_AMS_SWITCH, SimpleEvent);
@@ -1724,12 +1723,6 @@ AMSRoad::AMSRoad(wxWindow *parent, wxWindowID id, Caninfo info, int canindex, in
mouse_pos.y > rect.y + GetSize().y - FromDIP(40)) {
wxCommandEvent show_event(EVT_AMS_SHOW_HUMIDITY_TIPS);
wxPostEvent(GetParent()->GetParent(), show_event);
#ifdef __WXMSW__
wxCommandEvent close_event(EVT_CLEAR_SPEED_CONTROL);
wxPostEvent(GetParent()->GetParent(), close_event);
#endif // __WXMSW__
}
}
});
@@ -2819,12 +2812,6 @@ AMSHumidity::AMSHumidity(wxWindow* parent, wxWindowID id, AMSinfo info, const wx
info->current_temperature = m_amsinfo.current_temperature;
show_event.SetClientData(info);
wxPostEvent(GetParent()->GetParent(), show_event);
#ifdef __WXMSW__
wxCommandEvent close_event(EVT_CLEAR_SPEED_CONTROL);
wxPostEvent(GetParent()->GetParent(), close_event);
#endif // __WXMSW__
}
}
});

View File

@@ -846,7 +846,6 @@ wxDECLARE_EVENT(EVT_AMS_RETRY, wxCommandEvent);
wxDECLARE_EVENT(EVT_AMS_SHOW_HUMIDITY_TIPS, wxCommandEvent);
wxDECLARE_EVENT(EVT_AMS_UNSELETED_VAMS, wxCommandEvent);
wxDECLARE_EVENT(EVT_AMS_UNSELETED_AMS, wxCommandEvent);
wxDECLARE_EVENT(EVT_CLEAR_SPEED_CONTROL, wxCommandEvent);
wxDECLARE_EVENT(EVT_VAMS_ON_FILAMENT_EDIT, wxCommandEvent);
wxDECLARE_EVENT(EVT_AMS_SWITCH, SimpleEvent);