mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-13 15:48:59 +08:00
Removed the no_controller preference option, imported by mistake, having a true default, hiding controller from most users
This commit is contained in:
parent
8030b00be6
commit
10efa91104
@ -73,7 +73,6 @@ use constant AMF_MODEL_WILDCARD => join '|', @{&FILE_WILDCARDS}{qw(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 $autosave;
|
||||
our $threads;
|
||||
our @cb;
|
||||
@ -84,8 +83,6 @@ our $Settings = {
|
||||
autocenter => 1,
|
||||
invert_zoom => 0,
|
||||
background_processing => 0,
|
||||
# If set, the "Controller" tab for the control of the printer over serial line and the serial port settings are hidden.
|
||||
no_controller => 0,
|
||||
threads => $Slic3r::Config::Options->{threads}{default},
|
||||
color_toolpaths_by => 'role',
|
||||
tabbed_preset_editors => 1,
|
||||
|
@ -115,8 +115,7 @@ sub _init_tabpanel {
|
||||
});
|
||||
|
||||
$panel->AddPage($self->{plater} = Slic3r::GUI::Plater->new($panel), "Plater");
|
||||
$panel->AddPage($self->{controller} = Slic3r::GUI::Controller->new($panel), "Controller")
|
||||
unless ($Slic3r::GUI::Settings->{_}{no_controller});
|
||||
$panel->AddPage($self->{controller} = Slic3r::GUI::Controller->new($panel), "Controller");
|
||||
}
|
||||
|
||||
sub _init_menubar {
|
||||
@ -277,7 +276,7 @@ sub _init_menubar {
|
||||
}, undef, 'application_view_tile.png');
|
||||
wxTheApp->append_menu_item($windowMenu, "&Controller\tCtrl+Y", 'Show the printer controller', sub {
|
||||
$self->select_tab(1);
|
||||
}, undef, 'printer_empty.png') unless ($Slic3r::GUI::Settings->{_}{no_controller});
|
||||
}, undef, 'printer_empty.png');
|
||||
wxTheApp->append_menu_item($windowMenu, "DLP Projector…\tCtrl+P", 'Open projector window for DLP printing', sub {
|
||||
$self->{plater}->pause_background_process;
|
||||
Slic3r::GUI::SLAPrintOptions->new($self)->ShowModal;
|
||||
|
@ -64,13 +64,6 @@ sub new {
|
||||
tooltip => $Slic3r::Config::Options->{threads}{tooltip},
|
||||
default => $Slic3r::GUI::Settings->{_}{threads},
|
||||
));
|
||||
$optgroup->append_single_option_line(Slic3r::GUI::OptionsGroup::Option->new(
|
||||
opt_id => 'no_controller',
|
||||
type => 'bool',
|
||||
label => 'Disable USB/serial connection',
|
||||
tooltip => 'Disable communication with the printer over a serial / USB cable. This simplifies the user interface in case the printer is never attached to the computer.',
|
||||
default => $Slic3r::GUI::Settings->{_}{no_controller},
|
||||
));
|
||||
$optgroup->append_single_option_line(Slic3r::GUI::OptionsGroup::Option->new(
|
||||
opt_id => 'tabbed_preset_editors',
|
||||
type => 'bool',
|
||||
@ -95,7 +88,7 @@ sub new {
|
||||
sub _accept {
|
||||
my $self = shift;
|
||||
|
||||
if ($self->{values}{mode} || defined($self->{values}{no_controller})) {
|
||||
if ($self->{values}{mode}) {
|
||||
Slic3r::GUI::warning_catcher($self)->("You need to restart Slic3r to make the changes effective.");
|
||||
}
|
||||
|
||||
|
@ -1260,7 +1260,7 @@ sub build {
|
||||
}
|
||||
});
|
||||
}
|
||||
unless ($Slic3r::GUI::Settings->{_}{no_controller}) {
|
||||
{
|
||||
my $optgroup = $page->new_optgroup('USB/Serial connection');
|
||||
my $line = Slic3r::GUI::OptionsGroup::Line->new(
|
||||
label => 'Serial port',
|
||||
@ -1421,7 +1421,7 @@ sub build {
|
||||
$optgroup->append_single_option_line($option);
|
||||
}
|
||||
}
|
||||
$self->_update_serial_ports unless $Slic3r::GUI::Settings->{_}{no_controller};
|
||||
$self->_update_serial_ports;
|
||||
}
|
||||
|
||||
sub _update_serial_ports {
|
||||
|
@ -36,7 +36,6 @@ my %cli_options = ();
|
||||
'load=s@' => \$opt{load},
|
||||
'autosave=s' => \$opt{autosave},
|
||||
'ignore-nonexistent-config' => \$opt{ignore_nonexistent_config},
|
||||
'no-controller' => \$opt{no_controller},
|
||||
'datadir=s' => \$opt{datadir},
|
||||
'export-svg' => \$opt{export_svg},
|
||||
'merge|m' => \$opt{merge},
|
||||
@ -110,7 +109,6 @@ if ((!@ARGV || $opt{gui}) && !$opt{save} && eval "require Slic3r::GUI; 1") {
|
||||
{
|
||||
no warnings 'once';
|
||||
$Slic3r::GUI::datadir = Slic3r::decode_path($opt{datadir} // '');
|
||||
$Slic3r::GUI::no_controller = $opt{no_controller};
|
||||
$Slic3r::GUI::autosave = Slic3r::decode_path($opt{autosave} // '');
|
||||
$Slic3r::GUI::threads = $opt{threads};
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user