diff --git a/src/libslic3r/PresetBundle.cpp b/src/libslic3r/PresetBundle.cpp index 959f237533..a463741b47 100644 --- a/src/libslic3r/PresetBundle.cpp +++ b/src/libslic3r/PresetBundle.cpp @@ -334,7 +334,10 @@ VendorType PresetBundle::get_current_vendor_type() } } if (!vendor_name.empty()) - t = vendor_name.compare("BBL") == 0 ? VendorType::Unknown : VendorType::Marlin_BBL; + { + if(vendor_name.compare("BBL") == 0) + t = VendorType::Marlin_BBL; + } return t; } diff --git a/src/slic3r/GUI/MainFrame.cpp b/src/slic3r/GUI/MainFrame.cpp index 34bd00c58a..325e082987 100644 --- a/src/slic3r/GUI/MainFrame.cpp +++ b/src/slic3r/GUI/MainFrame.cpp @@ -1080,27 +1080,32 @@ void MainFrame::init_tabpanel() { } } - // SoftFever +// SoftFever void MainFrame::show_device(bool bBBLPrinter) { - if (m_tabpanel->GetPage(3) != m_monitor && - m_tabpanel->GetPage(3) != m_printer_view) { + if (m_tabpanel->GetPage(tpMonitor) != m_monitor && + m_tabpanel->GetPage(tpMonitor) != m_printer_view) { BOOST_LOG_TRIVIAL(error) << "Failed to find device tab"; return; } if (bBBLPrinter) { - if (m_tabpanel->GetPage(3) != m_monitor) { - m_tabpanel->RemovePage(3); - m_tabpanel->InsertPage(3, m_monitor, _L("Device"), + if (m_tabpanel->GetPage(tpMonitor) != m_monitor) { + m_printer_view->Hide(); + m_monitor->Show(true); + m_tabpanel->RemovePage(tpMonitor); + m_tabpanel->InsertPage(tpMonitor, m_monitor, _L("Device"), std::string("tab_monitor_active"), std::string("tab_monitor_active")); + m_tabpanel->SetSelection(tp3DEditor); } } else { - if (m_tabpanel->GetPage(3) != m_printer_view) { - m_tabpanel->RemovePage(3); - m_tabpanel->InsertPage(3, m_printer_view, _L("Device"), + if (m_tabpanel->GetPage(tpMonitor) != m_printer_view) { + m_printer_view->Show(); + m_monitor->Show(false); + m_tabpanel->RemovePage(tpMonitor); + m_tabpanel->InsertPage(tpMonitor, m_printer_view, _L("Device"), std::string("tab_monitor_active"), std::string("tab_monitor_active")); - m_printer_view->Show(); + m_tabpanel->SetSelection(tp3DEditor); } } diff --git a/src/slic3r/GUI/PlateSettingsDialog.cpp b/src/slic3r/GUI/PlateSettingsDialog.cpp index 9454b9f720..65d20fe5fb 100644 --- a/src/slic3r/GUI/PlateSettingsDialog.cpp +++ b/src/slic3r/GUI/PlateSettingsDialog.cpp @@ -35,7 +35,7 @@ PlateSettingsDialog::PlateSettingsDialog(wxWindow* parent, wxWindowID id, const m_bed_type_choice->Append(to_bed_type_name(i)); } - if (wxGetApp().preset_bundle->is_bbl_vendor()) + if (!wxGetApp().preset_bundle->is_bbl_vendor()) m_bed_type_choice->Disable(); wxStaticText* m_bed_type_txt = new wxStaticText(this, wxID_ANY, _L("Bed type")); diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp index affbec0ad8..25cb64512d 100644 --- a/src/slic3r/GUI/Plater.cpp +++ b/src/slic3r/GUI/Plater.cpp @@ -1028,12 +1028,13 @@ void Sidebar::update_all_preset_comboboxes() PresetBundle &preset_bundle = *wxGetApp().preset_bundle; const auto print_tech = preset_bundle.printers.get_edited_preset().printer_technology(); - bool is_bbl_preset = preset_bundle.is_bbl_vendor(); + bool is_bbl_vendor = preset_bundle.is_bbl_vendor(); + // Orca:: show device tab based on vendor type auto p_mainframe = wxGetApp().mainframe; + p_mainframe->show_device(is_bbl_vendor); - p_mainframe->show_device(is_bbl_preset); - if (is_bbl_preset) { + if (is_bbl_vendor) { //only show connection button for not-BBL printer connection_btn->Hide(); //only show sync-ams button for BBL printer @@ -1087,6 +1088,8 @@ void Sidebar::update_all_preset_comboboxes() if (p->combo_printer) p->combo_printer->update(); + + p_mainframe->m_tabpanel->SetSelection(p_mainframe->m_tabpanel->GetSelection()); } void Sidebar::update_presets(Preset::Type preset_type)