FIX: [STUDIO-3329] show/hide thirdparty calibrate button

Change-Id: Ie5a7cd454b50617af8c8bf9c78fecc60386e4e9d
(cherry picked from commit 1a98981f8b0a854f431d9430355b4fc5d2bb4fb1)
This commit is contained in:
chunmao.guo 2023-06-27 11:01:31 +08:00 committed by Lane.Wei
parent 1b0cd88899
commit 2a24eb55b8
5 changed files with 38 additions and 10 deletions

View file

@ -2408,6 +2408,8 @@ Plater::priv::priv(Plater *q, MainFrame *main_frame)
// Preset change event
sidebar->Bind(wxEVT_COMBOBOX, &priv::on_combobox_select, this);
sidebar->Bind(EVT_OBJ_LIST_OBJECT_SELECT, [this](wxEvent&) { priv::selection_changed(); });
bool isBBL = wxGetApp().preset_bundle->printers.get_edited_preset().is_bbl_vendor_preset(wxGetApp().preset_bundle);
main_frame->show_calibration_button(!isBBL);
// BBS: should bind BACKGROUND_PROCESS event to plater
q->Bind(EVT_SCHEDULE_BACKGROUND_PROCESS, [this](SimpleEvent&) { this->schedule_background_process(); });
// jump to found option from SearchDialog
@ -5726,6 +5728,9 @@ void Plater::priv::on_select_preset(wxCommandEvent &evt)
//wxWindowUpdateLocker noUpdates1(sidebar->print_panel());
wxWindowUpdateLocker noUpdates2(sidebar->filament_panel());
wxGetApp().get_tab(preset_type)->select_preset(preset_name);
bool isBBL = wxGetApp().preset_bundle->printers.get_edited_preset().is_bbl_vendor_preset(wxGetApp().preset_bundle);
main_frame->show_calibration_button(!isBBL);
}
// update plater with new config