mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-07 23:17:35 -06:00
misc fixes
This commit is contained in:
parent
c3d9ace470
commit
012f113eae
4 changed files with 26 additions and 15 deletions
|
@ -334,7 +334,10 @@ VendorType PresetBundle::get_current_vendor_type()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!vendor_name.empty())
|
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;
|
return t;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1080,27 +1080,32 @@ void MainFrame::init_tabpanel() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// SoftFever
|
// SoftFever
|
||||||
void MainFrame::show_device(bool bBBLPrinter) {
|
void MainFrame::show_device(bool bBBLPrinter) {
|
||||||
if (m_tabpanel->GetPage(3) != m_monitor &&
|
if (m_tabpanel->GetPage(tpMonitor) != m_monitor &&
|
||||||
m_tabpanel->GetPage(3) != m_printer_view) {
|
m_tabpanel->GetPage(tpMonitor) != m_printer_view) {
|
||||||
BOOST_LOG_TRIVIAL(error) << "Failed to find device tab";
|
BOOST_LOG_TRIVIAL(error) << "Failed to find device tab";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (bBBLPrinter) {
|
if (bBBLPrinter) {
|
||||||
if (m_tabpanel->GetPage(3) != m_monitor) {
|
if (m_tabpanel->GetPage(tpMonitor) != m_monitor) {
|
||||||
m_tabpanel->RemovePage(3);
|
m_printer_view->Hide();
|
||||||
m_tabpanel->InsertPage(3, m_monitor, _L("Device"),
|
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"),
|
||||||
std::string("tab_monitor_active"));
|
std::string("tab_monitor_active"));
|
||||||
|
m_tabpanel->SetSelection(tp3DEditor);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (m_tabpanel->GetPage(3) != m_printer_view) {
|
if (m_tabpanel->GetPage(tpMonitor) != m_printer_view) {
|
||||||
m_tabpanel->RemovePage(3);
|
m_printer_view->Show();
|
||||||
m_tabpanel->InsertPage(3, m_printer_view, _L("Device"),
|
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"),
|
||||||
std::string("tab_monitor_active"));
|
std::string("tab_monitor_active"));
|
||||||
m_printer_view->Show();
|
m_tabpanel->SetSelection(tp3DEditor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,7 @@ PlateSettingsDialog::PlateSettingsDialog(wxWindow* parent, wxWindowID id, const
|
||||||
m_bed_type_choice->Append(to_bed_type_name(i));
|
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();
|
m_bed_type_choice->Disable();
|
||||||
|
|
||||||
wxStaticText* m_bed_type_txt = new wxStaticText(this, wxID_ANY, _L("Bed type"));
|
wxStaticText* m_bed_type_txt = new wxStaticText(this, wxID_ANY, _L("Bed type"));
|
||||||
|
|
|
@ -1028,12 +1028,13 @@ void Sidebar::update_all_preset_comboboxes()
|
||||||
PresetBundle &preset_bundle = *wxGetApp().preset_bundle;
|
PresetBundle &preset_bundle = *wxGetApp().preset_bundle;
|
||||||
const auto print_tech = preset_bundle.printers.get_edited_preset().printer_technology();
|
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;
|
auto p_mainframe = wxGetApp().mainframe;
|
||||||
|
p_mainframe->show_device(is_bbl_vendor);
|
||||||
|
|
||||||
p_mainframe->show_device(is_bbl_preset);
|
if (is_bbl_vendor) {
|
||||||
if (is_bbl_preset) {
|
|
||||||
//only show connection button for not-BBL printer
|
//only show connection button for not-BBL printer
|
||||||
connection_btn->Hide();
|
connection_btn->Hide();
|
||||||
//only show sync-ams button for BBL printer
|
//only show sync-ams button for BBL printer
|
||||||
|
@ -1087,6 +1088,8 @@ void Sidebar::update_all_preset_comboboxes()
|
||||||
|
|
||||||
if (p->combo_printer)
|
if (p->combo_printer)
|
||||||
p->combo_printer->update();
|
p->combo_printer->update();
|
||||||
|
|
||||||
|
p_mainframe->m_tabpanel->SetSelection(p_mainframe->m_tabpanel->GetSelection());
|
||||||
}
|
}
|
||||||
|
|
||||||
void Sidebar::update_presets(Preset::Type preset_type)
|
void Sidebar::update_presets(Preset::Type preset_type)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue