ENH:reduce the refresh times of sending printed pages

jira:[none]

Change-Id: Iaa4864afa09e71a7b8fd09baf289ee17fa07eafc
(cherry picked from commit a0c9fad05291e7614d94b7cec3c4f32d1f1345d8)
This commit is contained in:
tao wang
2024-11-27 20:55:09 +08:00
committed by Noisyfox
parent 410549dc89
commit 9b97ebeec5
2 changed files with 12 additions and 4 deletions

View File

@@ -881,6 +881,10 @@ void SelectMachineDialog::update_select_layout(MachineObject *obj)
m_checkbox_list["flow_cali"]->Hide();
m_checkbox_list["nozzle_offset_cali"]->Hide();
if (!obj) {
return;
}
if (obj->is_enable_np) {
m_checkbox_list["nozzle_offset_cali"]->Show();
m_checkbox_list["nozzle_offset_cali"]->update_options(ops_auto);
@@ -923,7 +927,6 @@ void SelectMachineDialog::update_select_layout(MachineObject *obj)
m_checkbox_list["timelapse"]->setValue("on");
}
update_ams_check(obj);
update_flow_cali_check(obj);
Layout();
Fit();
@@ -2767,8 +2770,12 @@ void SelectMachineDialog::on_timer(wxTimerEvent &event)
MachineObject* obj_ = dev->get_selected_machine();
if(!obj_) return;
update_select_layout(obj_);
update_ams_check(obj_);
if (!m_check_flag && obj_->is_info_ready()) {
update_select_layout(obj_);
update_ams_check(obj_);
m_check_flag = true;
}
if (!obj_
|| obj_->amsList.empty()
@@ -2848,7 +2855,7 @@ void SelectMachineDialog::on_selection_changed(wxCommandEvent &event)
// Has changed machine unrecoverably
GUI::wxGetApp().sidebar().load_ams_list(obj->dev_id, obj);
update_select_layout(obj);
m_check_flag = false;
} else {
BOOST_LOG_TRIVIAL(error) << "on_selection_changed dev_id not found";
return;