mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-16 10:02:12 +00:00
ENH:reduce the refresh times of sending printed pages
jira:[none] Change-Id: Iaa4864afa09e71a7b8fd09baf289ee17fa07eafc (cherry picked from commit a0c9fad05291e7614d94b7cec3c4f32d1f1345d8)
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -256,6 +256,7 @@ private:
|
||||
bool m_export_3mf_cancel{ false };
|
||||
bool m_is_canceled{ false };
|
||||
bool m_is_rename_mode{ false };
|
||||
bool m_check_flag {false};
|
||||
PrintPageMode m_print_page_mode{PrintPageMode::PrintPageModePrepare};
|
||||
std::string m_print_error_msg;
|
||||
std::string m_print_error_extra;
|
||||
|
||||
Reference in New Issue
Block a user