FIX: try to reduce page fault while idling
jira: [none] Change-Id: I563cbf4a8ba8a4ae1e5b1b1f735753d3aef23e16
This commit is contained in:
parent
b47b19ed48
commit
ed1e9678c3
|
@ -967,6 +967,11 @@ void PrintingTaskPanel::update_left_time(int mc_left_time)
|
|||
|
||||
void PrintingTaskPanel::update_layers_num(bool show, wxString num)
|
||||
{
|
||||
if ((show == m_staticText_layers->IsShown()) && (num == m_staticText_layers->GetLabelText()))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (show) {
|
||||
m_staticText_layers->Show(true);
|
||||
m_staticText_layers->SetLabelText(num);
|
||||
|
@ -2617,16 +2622,7 @@ void StatusPanel::show_printing_status(bool ctrl_area, bool temp_area)
|
|||
|
||||
m_staticText_z_tip->SetForegroundColour(DISCONNECT_TEXT_COL);
|
||||
m_extruder_label->SetForegroundColour(DISCONNECT_TEXT_COL);
|
||||
m_switch_speed->SetValue(false);
|
||||
} else {
|
||||
m_switch_speed->Enable();
|
||||
m_switch_lamp->Enable();
|
||||
/*m_switch_nozzle_fan->Enable();
|
||||
m_switch_printing_fan->Enable();
|
||||
m_switch_cham_fan->Enable();*/
|
||||
|
||||
m_switch_fan->Enable();
|
||||
|
||||
m_bpButton_xy->Enable();
|
||||
m_bpButton_z_10->Enable();
|
||||
m_bpButton_z_1->Enable();
|
||||
|
@ -2644,7 +2640,6 @@ void StatusPanel::show_printing_status(bool ctrl_area, bool temp_area)
|
|||
|
||||
m_staticText_z_tip->SetForegroundColour(TEXT_LIGHT_FONT_COL);
|
||||
m_extruder_label->SetForegroundColour(TEXT_LIGHT_FONT_COL);
|
||||
m_switch_speed->SetValue(true);
|
||||
}
|
||||
|
||||
if (!temp_area) {
|
||||
|
@ -2777,7 +2772,7 @@ void StatusPanel::update_temp_ctrl(MachineObject *obj)
|
|||
m_temp_chamber_timeout--;
|
||||
}
|
||||
else {
|
||||
if (!cham_temp_input) { m_tempCtrl_chamber->SetTagTemp(obj->chamber_temp_target); }
|
||||
if (!cham_temp_input && obj->is_support_chamber_edit) { m_tempCtrl_chamber->SetTagTemp(obj->chamber_temp_target); }
|
||||
}
|
||||
|
||||
if ((obj->chamber_temp_target - obj->chamber_temp) >= TEMP_THRESHOLD_VAL) {
|
||||
|
@ -3424,12 +3419,7 @@ void StatusPanel::update_subtask(MachineObject *obj)
|
|||
m_project_task_panel->set_thumbnail_img(*calib_bitmap);
|
||||
}
|
||||
|
||||
if (obj->is_support_layer_num) {
|
||||
m_project_task_panel->update_layers_num(true);
|
||||
}
|
||||
else {
|
||||
m_project_task_panel->update_layers_num(false);
|
||||
}
|
||||
m_project_task_panel->show_layers_num(obj->is_support_layer_num);
|
||||
|
||||
update_model_info();
|
||||
|
||||
|
|
|
@ -301,6 +301,7 @@ public:
|
|||
void update_left_time(wxString time);
|
||||
void update_finish_time(wxString finish_time);
|
||||
void update_left_time(int mc_left_time);
|
||||
void show_layers_num(bool show) { m_staticText_layers->Show(show); }
|
||||
void update_layers_num(bool show, wxString num = wxEmptyString);
|
||||
void show_priting_use_info(bool show, wxString time = wxEmptyString, wxString weight = wxEmptyString);
|
||||
void show_profile_info(bool show, wxString profile = wxEmptyString);
|
||||
|
|
|
@ -45,6 +45,7 @@ public:
|
|||
void Rescale();
|
||||
|
||||
void ShowNewTag(bool tag = false) {show_new_tag = tag; Refresh();};
|
||||
bool GetShowNewTag() const { return show_new_tag; };
|
||||
|
||||
private:
|
||||
void paintEvent(wxPaintEvent& evt);
|
||||
|
|
|
@ -115,6 +115,11 @@ void TabButtonsListCtrl::SetSelection(int sel)
|
|||
|
||||
void TabButtonsListCtrl::showNewTag(int sel, bool tag)
|
||||
{
|
||||
if (m_pageButtons[sel]->GetShowNewTag() == tag)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
m_pageButtons[sel]->ShowNewTag(tag);
|
||||
Refresh();
|
||||
}
|
||||
|
|
|
@ -3075,6 +3075,9 @@ void AMSControl::CreateAmsDoubleNozzle()
|
|||
m_down_road->UpdatePassRoad(AMSPanelPos::RIGHT_PANEL, -1, AMSPassRoadSTEP::AMS_ROAD_STEP_NONE);
|
||||
m_extruder->OnAmsLoading(false, MAIN_NOZZLE_ID);
|
||||
|
||||
m_amswin->Layout();
|
||||
m_amswin->Fit();
|
||||
|
||||
//Thaw();
|
||||
}
|
||||
|
||||
|
@ -3160,6 +3163,9 @@ void AMSControl::CreateAmsSingleNozzle()
|
|||
m_extruder->updateNozzleNum(1);
|
||||
m_extruder->OnAmsLoading(false, MAIN_NOZZLE_ID);
|
||||
|
||||
m_amswin->Layout();
|
||||
m_amswin->Fit();
|
||||
|
||||
//Refresh();
|
||||
//Thaw();
|
||||
}
|
||||
|
@ -3198,7 +3204,12 @@ void AMSControl::show_noams_mode()
|
|||
|
||||
void AMSControl::show_auto_refill(bool show)
|
||||
{
|
||||
//m_img_ams_backup->Show(show);
|
||||
if (m_button_auto_refill->IsShown() == show)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
m_button_auto_refill->Show(show);
|
||||
m_amswin->Layout();
|
||||
m_amswin->Fit();
|
||||
}
|
||||
|
|
|
@ -718,6 +718,7 @@ void AMSextruder::updateNozzleNum(int nozzle_num)
|
|||
}
|
||||
|
||||
SetSizer(m_bitmap_sizer);
|
||||
Refresh();
|
||||
}
|
||||
|
||||
void AMSextruder::msw_rescale()
|
||||
|
@ -1527,10 +1528,10 @@ void AMSLib::Update(Caninfo info, std::string ams_idx, bool refresh)
|
|||
if (info.material_colour.Alpha() != 0 && info.material_colour.Alpha() != 255 && info.material_colour.Alpha() != 254 && m_info.material_colour != info.material_colour) {
|
||||
transparent_changed = true;
|
||||
}
|
||||
|
||||
m_info = info;
|
||||
m_ams_id = ams_idx;
|
||||
m_slot_id = info.can_id;
|
||||
Layout();
|
||||
if (refresh) Refresh();
|
||||
}
|
||||
|
||||
|
@ -3068,6 +3069,11 @@ void AmsItem::AddLiteCan(Caninfo caninfo, int canindex, wxGridSizer* sizer)
|
|||
|
||||
void AmsItem::Update(AMSinfo info)
|
||||
{
|
||||
if (m_info == info)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
m_info = info;
|
||||
m_can_count = info.cans.size();
|
||||
|
||||
|
|
|
@ -57,6 +57,8 @@ void SideToolsPanel::on_timer(wxTimerEvent &event)
|
|||
|
||||
void SideToolsPanel::set_current_printer_name(std::string dev_name)
|
||||
{
|
||||
if (m_dev_name == from_u8(dev_name)) return;
|
||||
|
||||
m_none_printer = false;
|
||||
m_dev_name = from_u8(dev_name);
|
||||
Refresh();
|
||||
|
|
Loading…
Reference in New Issue