mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-12 09:17:52 -06:00
Bugfix: when an external config was selected in any section, exported settings didn't reflect other sections properly
This commit is contained in:
parent
2f2bc8210a
commit
4fcecf5ef6
3 changed files with 21 additions and 12 deletions
|
@ -232,16 +232,22 @@ sub config {
|
|||
|
||||
# retrieve filament presets and build a single config object for them
|
||||
my $filament_config;
|
||||
foreach my $preset_idx ($self->{plater}->filament_presets) {
|
||||
my $preset = $self->{options_tabs}{filament}->get_preset($preset_idx);
|
||||
my $config = $self->{options_tabs}{filament}->get_preset_config($preset);
|
||||
if (!$filament_config) {
|
||||
$filament_config = $config;
|
||||
next;
|
||||
}
|
||||
foreach my $opt_key (keys %$config) {
|
||||
next unless ref $filament_config->get($opt_key) eq 'ARRAY';
|
||||
push @{ $filament_config->get($opt_key) }, $config->get($opt_key)->[0];
|
||||
if ($self->{plater}->filament_presets == 1) {
|
||||
$filament_config = $self->{options_tabs}{filament}->config;
|
||||
} else {
|
||||
# TODO: handle dirty presets.
|
||||
# perhaps plater shouldn't expose dirty presets at all in multi-extruder environments.
|
||||
foreach my $preset_idx ($self->{plater}->filament_presets) {
|
||||
my $preset = $self->{options_tabs}{filament}->get_preset($preset_idx);
|
||||
my $config = $self->{options_tabs}{filament}->get_preset_config($preset);
|
||||
if (!$filament_config) {
|
||||
$filament_config = $config;
|
||||
next;
|
||||
}
|
||||
foreach my $opt_key (keys %$config) {
|
||||
next unless ref $filament_config->get($opt_key) eq 'ARRAY';
|
||||
push @{ $filament_config->get($opt_key) }, $config->get($opt_key)->[0];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue