Merge pull request #1881 from sapir/master

Disable some calls to on_presets_changed to speed up switching profiles
visilibity
Alessandro Ranellucci 2014-04-06 12:52:05 +02:00
commit c7a96a3113
1 changed files with 3 additions and 1 deletions

View File

@ -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; #/