The "controller" tab and the settings of the USB/serial connection was

made configurable. Now one may hide the "controller" tab and the USB/serial
connection configuration from the preferences. This is useful for someone,
who never connects his printer to the computer by a cable.
This commit is contained in:
bubnikv 2016-05-16 23:40:24 +02:00
parent 510ca9f9e2
commit d8be976356
5 changed files with 53 additions and 20 deletions

View file

@ -53,6 +53,8 @@ use constant FILE_WILDCARDS => {
use constant MODEL_WILDCARD => join '|', @{&FILE_WILDCARDS}{qw(known stl obj amf)};
our $datadir;
# If set, the "Controller" tab for the control of the printer over serial line and the serial port settings are hidden.
our $no_controller;
our $no_plater;
our $mode;
our $autosave;
@ -64,6 +66,9 @@ our $Settings = {
version_check => 1,
autocenter => 1,
background_processing => 1,
# If set, the "Controller" tab for the control of the printer over serial line and the serial port settings are hidden.
# By default, Prusa has the controller hidden.
no_controller => 1,
},
};
@ -115,6 +120,8 @@ sub OnInit {
$Settings->{_}{mode} ||= 'expert';
$Settings->{_}{autocenter} //= 1;
$Settings->{_}{background_processing} //= 1;
# If set, the "Controller" tab for the control of the printer over serial line and the serial port settings are hidden.
$Settings->{_}{no_controller} //= 1;
}
$Settings->{_}{version} = $Slic3r::VERSION;
$self->save_settings;
@ -122,8 +129,10 @@ sub OnInit {
# application frame
Wx::Image::AddHandler(Wx::PNGHandler->new);
$self->{mainframe} = my $frame = Slic3r::GUI::MainFrame->new(
mode => $mode // $Settings->{_}{mode},
no_plater => $no_plater,
mode => $mode // $Settings->{_}{mode},
# If set, the "Controller" tab for the control of the printer over serial line and the serial port settings are hidden.
no_controller => $no_controller // $Settings->{_}{no_controller},
no_plater => $no_plater,
);
$self->SetTopWindow($frame);