FIX: [STUDIO-3294] show/hide thirdparty calibrate button
Change-Id: Ib720f7572255f4ac506f421ccf5256ed2e3c68d1
This commit is contained in:
parent
1be8ea44e5
commit
1c0ccc5f3d
|
@ -871,7 +871,7 @@ void MainFrame::show_publish_button(bool show)
|
||||||
void MainFrame::show_calibration_button(bool show)
|
void MainFrame::show_calibration_button(bool show)
|
||||||
{
|
{
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
bool shown = m_menubar->FindMenu(_L("Calibration"));
|
bool shown = m_menubar->FindMenu(_L("Calibration")) != wxNOT_FOUND;
|
||||||
if (shown == show) return;
|
if (shown == show) return;
|
||||||
if (show) m_menubar->Insert(3, m_calib_menu, wxString::Format("&%s", _L("Calibration")));
|
if (show) m_menubar->Insert(3, m_calib_menu, wxString::Format("&%s", _L("Calibration")));
|
||||||
else m_menubar->Remove(3);
|
else m_menubar->Remove(3);
|
||||||
|
|
|
@ -1153,6 +1153,9 @@ void Sidebar::update_presets(Preset::Type preset_type)
|
||||||
if (printer_tab) {
|
if (printer_tab) {
|
||||||
printer_tab->update();
|
printer_tab->update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool isBBL = wxGetApp().preset_bundle->printers.get_edited_preset().is_bbl_vendor_preset(wxGetApp().preset_bundle);
|
||||||
|
wxGetApp().mainframe->show_calibration_button(!isBBL);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2408,8 +2411,6 @@ Plater::priv::priv(Plater *q, MainFrame *main_frame)
|
||||||
// Preset change event
|
// Preset change event
|
||||||
sidebar->Bind(wxEVT_COMBOBOX, &priv::on_combobox_select, this);
|
sidebar->Bind(wxEVT_COMBOBOX, &priv::on_combobox_select, this);
|
||||||
sidebar->Bind(EVT_OBJ_LIST_OBJECT_SELECT, [this](wxEvent&) { priv::selection_changed(); });
|
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
|
// BBS: should bind BACKGROUND_PROCESS event to plater
|
||||||
q->Bind(EVT_SCHEDULE_BACKGROUND_PROCESS, [this](SimpleEvent&) { this->schedule_background_process(); });
|
q->Bind(EVT_SCHEDULE_BACKGROUND_PROCESS, [this](SimpleEvent&) { this->schedule_background_process(); });
|
||||||
// jump to found option from SearchDialog
|
// jump to found option from SearchDialog
|
||||||
|
@ -5728,9 +5729,6 @@ void Plater::priv::on_select_preset(wxCommandEvent &evt)
|
||||||
//wxWindowUpdateLocker noUpdates1(sidebar->print_panel());
|
//wxWindowUpdateLocker noUpdates1(sidebar->print_panel());
|
||||||
wxWindowUpdateLocker noUpdates2(sidebar->filament_panel());
|
wxWindowUpdateLocker noUpdates2(sidebar->filament_panel());
|
||||||
wxGetApp().get_tab(preset_type)->select_preset(preset_name);
|
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
|
// update plater with new config
|
||||||
|
|
Loading…
Reference in New Issue