From 59164f7bbb76a453f7c5f615637f89c0b0e08d5f Mon Sep 17 00:00:00 2001 From: Joseph Lenox Date: Sat, 10 Nov 2018 09:59:48 -0600 Subject: [PATCH] If tabs are used, make them fixed instead of appearing/disappearing. Fixes #4462 --- lib/Slic3r/GUI/MainFrame.pm | 9 ++++++++- lib/Slic3r/GUI/Plater.pm | 4 ++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/lib/Slic3r/GUI/MainFrame.pm b/lib/Slic3r/GUI/MainFrame.pm index dd066a1b3..dfae4d0fb 100644 --- a/lib/Slic3r/GUI/MainFrame.pm +++ b/lib/Slic3r/GUI/MainFrame.pm @@ -99,7 +99,7 @@ sub _init_tabpanel { my $panel = $self->{tabpanel}->GetPage($self->{tabpanel}->GetSelection); $panel->OnActivate if $panel->can('OnActivate'); if ($self->{tabpanel}->GetSelection > 1) { - $self->{tabpanel}->SetWindowStyle($self->{tabpanel}->GetWindowStyleFlag | wxAUI_NB_CLOSE_ON_ACTIVE_TAB); + $self->{tabpanel}->SetWindowStyle($self->{tabpanel}->GetWindowStyleFlag); } elsif(!$Slic3r::GUI::Settings->{_}{show_host} && ($self->{tabpanel}->GetSelection == 1)){ $self->{tabpanel}->SetWindowStyle($self->{tabpanel}->GetWindowStyleFlag | wxAUI_NB_CLOSE_ON_ACTIVE_TAB); } else { @@ -119,6 +119,13 @@ sub _init_tabpanel { $panel->AddPage($self->{plater} = Slic3r::GUI::Plater->new($panel), "Plater"); $panel->AddPage($self->{controller} = Slic3r::GUI::Controller->new($panel), "Controller") if ($Slic3r::GUI::Settings->{_}{show_host}); + + if ($Slic3r::GUI::Settings->{_}{tabbed_preset_editors}) { + $self->{plater}->show_preset_editor('print', 0,0,0); + $self->{plater}->show_preset_editor('filament', 0,0,0); + $self->{plater}->show_preset_editor('printer', 0, 0, 0); + } + } sub _init_menubar { diff --git a/lib/Slic3r/GUI/Plater.pm b/lib/Slic3r/GUI/Plater.pm index b8b140513..a68f1a010 100644 --- a/lib/Slic3r/GUI/Plater.pm +++ b/lib/Slic3r/GUI/Plater.pm @@ -892,7 +892,7 @@ sub selected_presets { } sub show_preset_editor { - my ($self, $group, $i) = @_; + my ($self, $group, $i, $load) = @_; wxTheApp->CallAfter(sub { my @presets = $self->selected_presets($group); @@ -908,7 +908,7 @@ sub show_preset_editor { } elsif ($Slic3r::GUI::Settings->{_}{tabbed_preset_editors}) { my $class = "Slic3r::GUI::PresetEditor::" . ucfirst($group); $mainframe->{preset_editor_tabs}{$group} = $preset_editor = $class->new($self->GetFrame); - $tabpanel->AddPage($preset_editor, ucfirst($group) . " Settings", 1); + $tabpanel->AddPage($preset_editor, ucfirst($group) . " Settings", $load); } else { my $class = "Slic3r::GUI::PresetEditorDialog::" . ucfirst($group); $dlg = $class->new($self);