mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-12 02:29:03 +08:00
Update all shortcuts (including manually added ones) when closing the preset editor
This commit is contained in:
parent
202a00c270
commit
2efb863a87
@ -577,11 +577,13 @@ sub _on_select_preset {
|
|||||||
my $shortcuts = $config->get('shortcuts');
|
my $shortcuts = $config->get('shortcuts');
|
||||||
|
|
||||||
# Add/remove options (we do it this way for preserving current options)
|
# 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
|
# Populate option with the default value taken from configuration
|
||||||
# (re-set the override always, because if we here it means user
|
# (re-set the override always, because if we here it means user
|
||||||
# switched to this preset or opened/closed the editor, so he expects
|
# switched to this preset or opened/closed the editor, so he expects
|
||||||
# the new values set in the editor to be used).
|
# 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));
|
$o_config->set($opt_key, $config->get($opt_key));
|
||||||
}
|
}
|
||||||
foreach my $opt_key (@{$o_config->get_keys}) {
|
foreach my $opt_key (@{$o_config->get_keys}) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user