mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-13 22:05:54 +08:00
If tabs are used, make them fixed instead of appearing/disappearing.
Fixes #4462
This commit is contained in:
parent
703adba7e3
commit
59164f7bbb
@ -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 {
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user