mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-04 05:50:48 +08:00
Use fixed tabs instead of closable tabs (and start automatically if tabs are being used from settings). Mirroring slic3r UI.
This commit is contained in:
parent
2dd94ee672
commit
ba57c5085b
@ -84,7 +84,7 @@ void MainFrame::init_tabpanel()
|
||||
auto tabpanel = this->tabpanel;
|
||||
// TODO: trigger processing for activation event
|
||||
if (tabpanel->GetSelection() > 1) {
|
||||
tabpanel->SetWindowStyle(tabpanel->GetWindowStyleFlag() | wxAUI_NB_CLOSE_ON_ACTIVE_TAB);
|
||||
tabpanel->SetWindowStyle(tabpanel->GetWindowStyleFlag());
|
||||
} else if (ui_settings->show_host == false && tabpanel->GetSelection() == 1) {
|
||||
tabpanel->SetWindowStyle(tabpanel->GetWindowStyleFlag() | wxAUI_NB_CLOSE_ON_ACTIVE_TAB);
|
||||
} else {
|
||||
@ -105,6 +105,11 @@ void MainFrame::init_tabpanel()
|
||||
|
||||
panel->AddPage(this->plater, this->plater->GetName());
|
||||
if (ui_settings->show_host) panel->AddPage(this->controller, this->controller->GetName());
|
||||
if (ui_settings->preset_editor_tabs) {
|
||||
this->plater->show_preset_editor(preset_t::Print,0);
|
||||
this->plater->show_preset_editor(preset_t::Material,0);
|
||||
this->plater->show_preset_editor(preset_t::Printer,0);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -116,6 +116,7 @@ public:
|
||||
Preset* selected_presets(preset_t preset);
|
||||
/// Return a reference to all currently selected presets.
|
||||
std::vector<Preset*> selected_presets();
|
||||
void show_preset_editor(preset_t preset, unsigned int idx);
|
||||
private:
|
||||
std::shared_ptr<Slic3r::Print> print {std::make_shared<Print>(Slic3r::Print())};
|
||||
std::shared_ptr<Slic3r::Model> model {std::make_shared<Model>(Slic3r::Model())};
|
||||
@ -260,7 +261,6 @@ private:
|
||||
std::vector<wxBitmapComboBox*> preset_choosers {preset_types, nullptr};
|
||||
void _on_change_combobox(preset_t preset, wxBitmapComboBox* choice);
|
||||
|
||||
void show_preset_editor(preset_t preset, unsigned int idx);
|
||||
|
||||
void _on_select_preset(preset_t preset) {};
|
||||
void load_presets();
|
||||
|
Loading…
x
Reference in New Issue
Block a user