Finished porting of the status bar to C++.
This commit is contained in:
parent
36faa090fc
commit
2c9dc4dbbf
7 changed files with 10 additions and 25 deletions
|
@ -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';
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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("");
|
||||
|
||||
|
|
|
@ -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;
|
Loading…
Add table
Add a link
Reference in a new issue