Skip to content

Commit

Permalink
Warn about the need to restart Slic3r to make certain preferences eff…
Browse files Browse the repository at this point in the history
…ective
  • Loading branch information
alranel committed Nov 10, 2018
1 parent 5712674 commit 1e4fb2d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions lib/Slic3r/GUI/Preferences.pm
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Preferences dialog, opens from Menu: File->Preferences

package Slic3r::GUI::Preferences;
use List::Util qw(any);
use Wx qw(:dialog :id :misc :sizer :systemsettings wxTheApp);
use Wx::Event qw(EVT_BUTTON EVT_TEXT_ENTER);
use base 'Wx::Dialog';
Expand Down Expand Up @@ -82,7 +83,7 @@ sub new {
opt_id => 'show_host',
type => 'bool',
label => 'Show Controller Tab (requires restart)',
tooltip => 'Shows/Hides the Controller Tab. Requires a restart of Slic3r.',
tooltip => 'Shows/Hides the Controller Tab. (Restart of Slic3r required.)',
default => $Slic3r::GUI::Settings->{_}{show_host},
));
$optgroup->append_single_option_line(Slic3r::GUI::OptionsGroup::Option->new( # nudge_val
Expand Down Expand Up @@ -113,7 +114,7 @@ sub new {
opt_id => 'extended_gui',
type => 'select',
label => 'Extended GUI: ',
tooltip => 'Choose extended rotate commands in the toolbar and/or in the context menu. If you don\'t use the default color scheme, the themed icons for the toolbar will be used. Requires a restart of Slic3r.',
tooltip => 'Choose extended rotate commands in the toolbar and/or in the context menu. If you don\'t use the default color scheme, the themed icons for the toolbar will be used.(Restart of Slic3r required.)',
labels => ['Default', 'Context only', 'Toolbar only', 'Toolbar and Context', 'Toolbar only (big)', 'Toolbar (big) and Context'],
values => [0, 1, 2, 3, 4, 5],
default => $Slic3r::GUI::Settings->{_}{extended_gui},
Expand All @@ -123,7 +124,7 @@ sub new {
opt_id => 'colorscheme',
type => 'select',
label => 'Color Scheme',
tooltip => 'Choose between color schemes - restart of Slic3r required.',
tooltip => 'Choose between color schemes. (Restart of Slic3r required.)',
labels => ['Default','Solarized'], # add more schemes, if you want in ColorScheme.pm.
values => ['getDefault','getSolarized'], # add more schemes, if you want - those are the names of the corresponding function in ColorScheme.pm.
default => $Slic3r::GUI::Settings->{_}{colorscheme},
Expand All @@ -146,7 +147,7 @@ sub new {
sub _accept {
my $self = shift;

if ($self->{values}{mode}) {
if (any { exists $self->{values}{$_} } qw(show_host extended_gui colorscheme)) {
Slic3r::GUI::warning_catcher($self)->("You need to restart Slic3r to make the changes effective.");
}

Expand Down

0 comments on commit 1e4fb2d

Please sign in to comment.