Merge pull request #1881 from sapir/master
Disable some calls to on_presets_changed to speed up switching profiles
This commit is contained in:
commit
c7a96a3113
@ -268,7 +268,6 @@ sub add_options_page {
|
||||
my $page = Slic3r::GUI::Tab::Page->new($self, $title, $self->{iconcount}, %params, on_change => sub {
|
||||
$self->on_value_change(@_);
|
||||
$self->set_dirty(1);
|
||||
$self->on_presets_changed;
|
||||
});
|
||||
$page->Hide;
|
||||
$self->{sizer}->Add($page, 1, wxEXPAND | wxLEFT, 5);
|
||||
@ -312,6 +311,9 @@ sub update_tree {
|
||||
sub set_dirty {
|
||||
my $self = shift;
|
||||
my ($dirty) = @_;
|
||||
|
||||
return if $dirty and $self->is_dirty;
|
||||
return if (not $dirty) and (not $self->is_dirty);
|
||||
|
||||
my $selection = $self->{presets_choice}->GetSelection;
|
||||
my $i = $self->{dirty} // $selection; #/
|
||||
|
Loading…
Reference in New Issue
Block a user