mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-15 00:05:57 +08:00
Populate the filament_preset placeholder with all the presets. #3577
This commit is contained in:
parent
fc5fec1315
commit
f9f8be46e3
@ -656,6 +656,7 @@ sub load_presets {
|
|||||||
@sel = (0) if !@sel;
|
@sel = (0) if !@sel;
|
||||||
|
|
||||||
# populate the wxChoice objects
|
# populate the wxChoice objects
|
||||||
|
my @preset_names = ();
|
||||||
foreach my $choice (@choosers) {
|
foreach my $choice (@choosers) {
|
||||||
$choice->Clear;
|
$choice->Clear;
|
||||||
$self->{preset_choosers_names}{$choice} = [];
|
$self->{preset_choosers_names}{$choice} = [];
|
||||||
@ -691,11 +692,13 @@ sub load_presets {
|
|||||||
$choice->SetSelection($selected);
|
$choice->SetSelection($selected);
|
||||||
|
|
||||||
my $preset_name = $self->{preset_choosers_names}{$choice}[$selected];
|
my $preset_name = $self->{preset_choosers_names}{$choice}[$selected];
|
||||||
$self->{print}->placeholder_parser->set("${group}_preset", $preset_name);
|
push @preset_names, $preset_name;
|
||||||
# TODO: populate other filament preset placeholders
|
# TODO: populate other filament preset placeholders
|
||||||
$selected_printer_name = $preset_name if $group eq 'printer';
|
$selected_printer_name = $preset_name if $group eq 'printer';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$self->{print}->placeholder_parser->set("${group}_preset", [ @preset_names ]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user