Store the tab name within each tab for reuse
This commit is contained in:
parent
d0588c2ef8
commit
30d88d7ffa
@ -28,9 +28,9 @@ sub new {
|
||||
filament => Slic3r::GUI::Tab::Filament->new ($tabpanel, sync_presets_with => $self->{plater}{preset_choosers}{filament}),
|
||||
printer => Slic3r::GUI::Tab::Printer->new ($tabpanel, sync_presets_with => $self->{plater}{preset_choosers}{printer}),
|
||||
};
|
||||
$tabpanel->AddPage($self->{options_tabs}{print}, "Print settings");
|
||||
$tabpanel->AddPage($self->{options_tabs}{filament}, "Filament settings");
|
||||
$tabpanel->AddPage($self->{options_tabs}{printer}, "Printer settings");
|
||||
$tabpanel->AddPage($self->{options_tabs}{print}, $self->{options_tabs}{print}->title);
|
||||
$tabpanel->AddPage($self->{options_tabs}{filament}, $self->{options_tabs}{filament}->title);
|
||||
$tabpanel->AddPage($self->{options_tabs}{printer}, $self->{options_tabs}{printer}->title);
|
||||
|
||||
my $buttons_sizer;
|
||||
{
|
||||
|
@ -11,9 +11,11 @@ use base 'Wx::Panel';
|
||||
|
||||
sub new {
|
||||
my $class = shift;
|
||||
my ($parent, %params) = @_;
|
||||
my ($parent, $title, %params) = @_;
|
||||
my $self = $class->SUPER::new($parent, -1, [-1,-1], [-1,-1], &Wx::wxBK_LEFT);
|
||||
|
||||
$self->{title} = $title;
|
||||
|
||||
$self->{sync_presets_with} = $params{sync_presets_with};
|
||||
EVT_CHOICE($parent, $self->{sync_presets_with}, sub {
|
||||
$self->{presets_choice}->SetSelection($self->{sync_presets_with}->GetSelection);
|
||||
@ -197,6 +199,11 @@ sub is_dirty {
|
||||
return $self->{dirty};
|
||||
}
|
||||
|
||||
sub title {
|
||||
my $self = shift;
|
||||
return $self->{title}
|
||||
}
|
||||
|
||||
sub load_presets {
|
||||
my $self = shift;
|
||||
my ($group) = @_;
|
||||
@ -259,7 +266,7 @@ use base 'Slic3r::GUI::Tab';
|
||||
sub new {
|
||||
my $class = shift;
|
||||
my ($parent, %params) = @_;
|
||||
my $self = $class->SUPER::new($parent, %params);
|
||||
my $self = $class->SUPER::new($parent, 'Print Settings', %params);
|
||||
|
||||
$self->add_options_page('Layers and perimeters', 'layers.png', optgroups => [
|
||||
{
|
||||
@ -365,7 +372,7 @@ use base 'Slic3r::GUI::Tab';
|
||||
sub new {
|
||||
my $class = shift;
|
||||
my ($parent, %params) = @_;
|
||||
my $self = $class->SUPER::new($parent, %params);
|
||||
my $self = $class->SUPER::new($parent, 'Filament Settings', %params);
|
||||
|
||||
$self->add_options_page('Filament', 'spool.png', optgroups => [
|
||||
{
|
||||
@ -407,7 +414,7 @@ use base 'Slic3r::GUI::Tab';
|
||||
sub new {
|
||||
my $class = shift;
|
||||
my ($parent, %params) = @_;
|
||||
my $self = $class->SUPER::new($parent, %params);
|
||||
my $self = $class->SUPER::new($parent, 'Printer Settings', %params);
|
||||
|
||||
$self->add_options_page('General', 'printer_empty.png', optgroups => [
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user