ENH:add check for flow cali

Change-Id: Ic3c808b16a1a07e459323604f5db175e26dc41e1
This commit is contained in:
tao wang 2023-09-27 12:46:02 +08:00 committed by Lane.Wei
parent 537e0ae31c
commit faf2a85311
2 changed files with 19 additions and 11 deletions

View file

@ -3046,6 +3046,8 @@ void SelectMachineDialog::on_selection_changed(wxCommandEvent &event)
//reset print status
update_flow_cali_check(obj);
show_status(PrintDialogStatus::PrintStatusInit);
reset_ams_material();
@ -3053,6 +3055,21 @@ void SelectMachineDialog::on_selection_changed(wxCommandEvent &event)
update_show_status();
}
void SelectMachineDialog::update_flow_cali_check(MachineObject* obj)
{
auto bed_type = m_plater->get_partplate_list().get_curr_plate()->get_bed_type(true);
auto show_cali_tips = true;
if (obj && obj->printer_type == "N1") { show_cali_tips = false; }
if (bed_type == BedType::btPTE) {
set_flow_calibration_state(false, show_cali_tips);
}
else {
set_flow_calibration_state(true, show_cali_tips);
}
}
void SelectMachineDialog::update_ams_check(MachineObject* obj)
{
if (obj && obj->is_function_supported(FUNC_USE_AMS)
@ -3724,17 +3741,7 @@ void SelectMachineDialog::set_default_normal()
m_scrollable_view->SetMaxSize(m_scrollable_region->GetSize());
//disable pei bed
auto bed_type = m_plater->get_partplate_list().get_curr_plate()->get_bed_type(true);
auto show_cali_tips = true;
if (obj_ && obj_->printer_type == "N1") { show_cali_tips = false; }
if (bed_type == BedType::btPTE) {
set_flow_calibration_state(false, show_cali_tips);
}
else {
set_flow_calibration_state(true, show_cali_tips);
}
update_flow_cali_check(obj_);
wxSize screenSize = wxGetDisplaySize();
auto dialogSize = this->GetSize();

View file

@ -432,6 +432,7 @@ public:
void update_page_turn_state(bool show);
void on_timer(wxTimerEvent& event);
void on_selection_changed(wxCommandEvent& event);
void update_flow_cali_check(MachineObject* obj);
void Enable_Refresh_Button(bool en);
void Enable_Send_Button(bool en);
void on_dpi_changed(const wxRect& suggested_rect) override;