mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-18 20:28:08 -06:00
Restore the (modified) label in preset comboctrl
This commit is contained in:
parent
1fcfdf4718
commit
c2c321c90b
2 changed files with 14 additions and 5 deletions
|
@ -437,7 +437,7 @@ sub GetFrame {
|
|||
|
||||
sub update_presets {
|
||||
my $self = shift;
|
||||
my ($group, $presets, $selected) = @_;
|
||||
my ($group, $presets, $selected, $is_dirty) = @_;
|
||||
|
||||
foreach my $choice (@{ $self->{preset_choosers}{$group} }) {
|
||||
my $sel = $choice->GetSelection;
|
||||
|
@ -463,7 +463,13 @@ sub update_presets {
|
|||
}
|
||||
$choice->AppendString($preset->name, $bitmap);
|
||||
}
|
||||
$choice->SetSelection($sel) if $sel <= $#$presets;
|
||||
|
||||
if ($sel <= $#$presets) {
|
||||
$choice->SetSelection($sel);
|
||||
if ($is_dirty) {
|
||||
$choice->SetString($sel, $choice->GetString($sel) . " (modified)");
|
||||
}
|
||||
}
|
||||
}
|
||||
$self->{preset_choosers}{$group}[0]->SetSelection($selected);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue