From 2efb863a8708ccc1ce02cd62564cf8db640b70b1 Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Sat, 29 Apr 2017 20:55:30 +0200 Subject: [PATCH] Update all shortcuts (including manually added ones) when closing the preset editor --- lib/Slic3r/GUI/Plater.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/Slic3r/GUI/Plater.pm b/lib/Slic3r/GUI/Plater.pm index fcc402064..d561158f7 100644 --- a/lib/Slic3r/GUI/Plater.pm +++ b/lib/Slic3r/GUI/Plater.pm @@ -577,11 +577,13 @@ sub _on_select_preset { my $shortcuts = $config->get('shortcuts'); # Add/remove options (we do it this way for preserving current options) - foreach my $opt_key (@$shortcuts) { + foreach my $opt_key (@{$o_config->get_keys}, @$shortcuts) { # Populate option with the default value taken from configuration # (re-set the override always, because if we here it means user # switched to this preset or opened/closed the editor, so he expects # the new values set in the editor to be used). + # Do this for both the current options and the configured shortcuts + # to make sure everything gets updated. $o_config->set($opt_key, $config->get($opt_key)); } foreach my $opt_key (@{$o_config->get_keys}) {