diff --git a/lib/Slic3r/GUI/Plater.pm b/lib/Slic3r/GUI/Plater.pm index e01fd060f3..e5ea7b5c25 100644 --- a/lib/Slic3r/GUI/Plater.pm +++ b/lib/Slic3r/GUI/Plater.pm @@ -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); } diff --git a/lib/Slic3r/GUI/Tab.pm b/lib/Slic3r/GUI/Tab.pm index a7a7f90366..0aed46ca38 100644 --- a/lib/Slic3r/GUI/Tab.pm +++ b/lib/Slic3r/GUI/Tab.pm @@ -180,8 +180,11 @@ sub _update {} sub _on_presets_changed { my $self = shift; - $self->{on_presets_changed}->($self->{presets}, $self->{presets_choice}->GetSelection) - if $self->{on_presets_changed}; + $self->{on_presets_changed}->( + $self->{presets}, + scalar($self->{presets_choice}->GetSelection), + $self->is_dirty, + ) if $self->{on_presets_changed}; } sub on_preset_loaded {} @@ -1043,10 +1046,10 @@ sub build { $optgroup->on_change(sub { my ($opt_id) = @_; if ($opt_id eq 'extruders_count') { - $self->update_dirty; wxTheApp->CallAfter(sub { $self->_extruders_count_changed($optgroup->get_value('extruders_count')); }); + $self->update_dirty; } }); }