A couple minor fixes for the new GUI

This commit is contained in:
Alessandro Ranellucci 2017-03-17 15:45:24 +01:00
parent 5d77c160c6
commit 4fe51125cf
2 changed files with 2 additions and 2 deletions

View File

@ -656,7 +656,7 @@ sub load_presets {
} }
my $selected = shift @sel; my $selected = shift @sel;
if ($selected <= $#presets) { if (defined $selected && $selected <= $#presets) {
# call SetSelection() only after SetString() otherwise the new string # call SetSelection() only after SetString() otherwise the new string
# won't be picked up as the visible string # won't be picked up as the visible string
$choice->SetSelection($selected); $choice->SetSelection($selected);

View File

@ -33,7 +33,7 @@ sub config {
for grep $external_config->has($_), @$keys; for grep $external_config->has($_), @$keys;
# For extra_keys we don't populate defaults. # For extra_keys we don't populate defaults.
if ($extra_keys) { if ($extra_keys && !$self->external) {
$config->set($_, $external_config->get($_)) $config->set($_, $external_config->get($_))
for grep $external_config->has($_), @$extra_keys; for grep $external_config->has($_), @$extra_keys;
} }