From 4fe51125cfd460f1d443da48ce20416cab5adfd5 Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Fri, 17 Mar 2017 15:45:24 +0100 Subject: [PATCH] A couple minor fixes for the new GUI --- lib/Slic3r/GUI/Plater.pm | 2 +- lib/Slic3r/GUI/Preset.pm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Slic3r/GUI/Plater.pm b/lib/Slic3r/GUI/Plater.pm index b93e49038..5fb3b29f4 100644 --- a/lib/Slic3r/GUI/Plater.pm +++ b/lib/Slic3r/GUI/Plater.pm @@ -656,7 +656,7 @@ sub load_presets { } my $selected = shift @sel; - if ($selected <= $#presets) { + if (defined $selected && $selected <= $#presets) { # call SetSelection() only after SetString() otherwise the new string # won't be picked up as the visible string $choice->SetSelection($selected); diff --git a/lib/Slic3r/GUI/Preset.pm b/lib/Slic3r/GUI/Preset.pm index 35208f585..d855c3c60 100644 --- a/lib/Slic3r/GUI/Preset.pm +++ b/lib/Slic3r/GUI/Preset.pm @@ -33,7 +33,7 @@ sub config { for grep $external_config->has($_), @$keys; # For extra_keys we don't populate defaults. - if ($extra_keys) { + if ($extra_keys && !$self->external) { $config->set($_, $external_config->get($_)) for grep $external_config->has($_), @$extra_keys; }