diff options
author | Alessandro Ranellucci <aar@cpan.org> | 2011-10-03 19:41:45 +0400 |
---|---|---|
committer | Alessandro Ranellucci <aar@cpan.org> | 2011-10-03 19:41:45 +0400 |
commit | 71a373e437870804a158f8b076a52fcafe28b101 (patch) | |
tree | 5523dd5f4913ad2a83424fb3ce5192ece3632ee7 /lib/Slic3r/GUI | |
parent | 076087af2ebfbf37e3abb812fb67d7822df1182a (diff) |
Bugfix: error during skein freezed the GUI
Diffstat (limited to 'lib/Slic3r/GUI')
-rw-r--r-- | lib/Slic3r/GUI/SkeinPanel.pm | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Slic3r/GUI/SkeinPanel.pm b/lib/Slic3r/GUI/SkeinPanel.pm index 5792ad7d0..01ca86e16 100644 --- a/lib/Slic3r/GUI/SkeinPanel.pm +++ b/lib/Slic3r/GUI/SkeinPanel.pm @@ -225,6 +225,7 @@ sub new { sub do_slice { my $self = shift; + my $process_dialog; eval { # validate configuration Slic3r::Config->validate; @@ -236,7 +237,7 @@ sub do_slice { my $input_file_basename = basename($input_file); # show processbar dialog - my $process_dialog = Wx::ProgressDialog->new('Slicing...', "Processing $input_file_basename...", + $process_dialog = Wx::ProgressDialog->new('Slicing...', "Processing $input_file_basename...", 100, $self, wxPD_APP_MODAL); $process_dialog->Pulse; my $skein = Slic3r::Skein->new( @@ -244,12 +245,14 @@ sub do_slice { ); $skein->go; $process_dialog->Destroy; + undef $process_dialog; Wx::MessageDialog->new($self, "$input_file_basename was successfully sliced.", 'Done!', wxOK | wxICON_INFORMATION)->ShowModal; }; if (my $err = $@) { + $process_dialog->Destroy if $process_dialog; Wx::MessageDialog->new($self, $err, 'Error', wxOK | wxICON_ERROR)->ShowModal; } } |