diff options
author | bubnikv <bubnikv@gmail.com> | 2018-09-14 11:59:50 +0300 |
---|---|---|
committer | bubnikv <bubnikv@gmail.com> | 2018-09-14 11:59:50 +0300 |
commit | 2c9dc4dbbf86a9c6e0b85ac1c29233ff040a2299 (patch) | |
tree | 670361b602a1e7415837e11965711e537bef7ee0 /lib | |
parent | 36faa090fcf57bdb7aceddfaa7148141165cb073 (diff) |
Finished porting of the status bar to C++.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Slic3r/GUI.pm | 1 | ||||
-rw-r--r-- | lib/Slic3r/GUI/MainFrame.pm | 1 | ||||
-rw-r--r-- | lib/Slic3r/GUI/Plater.pm | 2 | ||||
-rw-r--r-- | lib/Slic3r/GUI/ProgressStatusBar.pm | 18 |
4 files changed, 2 insertions, 20 deletions
diff --git a/lib/Slic3r/GUI.pm b/lib/Slic3r/GUI.pm index d25f1a8af..8da287110 100644 --- a/lib/Slic3r/GUI.pm +++ b/lib/Slic3r/GUI.pm @@ -10,7 +10,6 @@ use Slic3r::GUI::MainFrame; use Slic3r::GUI::Plater; use Slic3r::GUI::Plater::3D; use Slic3r::GUI::Plater::3DPreview; -use Slic3r::GUI::ProgressStatusBar; use Wx::Locale gettext => 'L'; diff --git a/lib/Slic3r/GUI/MainFrame.pm b/lib/Slic3r/GUI/MainFrame.pm index e2a25a7ab..092311e75 100644 --- a/lib/Slic3r/GUI/MainFrame.pm +++ b/lib/Slic3r/GUI/MainFrame.pm @@ -114,6 +114,7 @@ sub new { # Save the slic3r.ini. Usually the ini file is saved from "on idle" callback, # but in rare cases it may not have been called yet. wxTheApp->{app_config}->save; + $self->{statusbar}->ResetCancelCallback(); $self->{plater}->{print} = undef if($self->{plater}); Slic3r::GUI::_3DScene::remove_all_canvases(); Slic3r::GUI::deregister_on_request_update_callback(); diff --git a/lib/Slic3r/GUI/Plater.pm b/lib/Slic3r/GUI/Plater.pm index d3cca7e53..3bb9e59dc 100644 --- a/lib/Slic3r/GUI/Plater.pm +++ b/lib/Slic3r/GUI/Plater.pm @@ -1534,7 +1534,7 @@ sub on_process_completed { # At this point of time the thread should be either finished or canceled, # so the following call just confirms, that the produced data were consumed. $self->{background_slicing_process}->stop; - $self->statusbar->SetCancelCallback(undef); + $self->statusbar->ResetCancelCallback(); $self->statusbar->StopBusy; $self->statusbar->SetStatusText(""); diff --git a/lib/Slic3r/GUI/ProgressStatusBar.pm b/lib/Slic3r/GUI/ProgressStatusBar.pm deleted file mode 100644 index edc0c0ce3..000000000 --- a/lib/Slic3r/GUI/ProgressStatusBar.pm +++ /dev/null @@ -1,18 +0,0 @@ -# Status bar at the bottom of the main screen. -# Now it just implements cancel cb on perl side, every other functionality is -# in C++ - -package Slic3r::GUI::ProgressStatusBar; -use strict; -use warnings; - -our $cancel_cb; - -sub SetCancelCallback { - my $self = shift; - my ($cb) = @_; - $cancel_cb = $cb; - $cb ? $self->ShowCancelButton : $self->HideCancelButton; -} - -1; |