mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-07-14 00:51:54 +08:00
Slice objects even if background processing is disabled
This commit is contained in:
parent
5ba2f72324
commit
c1f95ac173
@ -402,6 +402,7 @@ package Slic3r::GUI::Projector::Controller;
|
|||||||
use Moo;
|
use Moo;
|
||||||
use Wx qw(wxTheApp :id :timer);
|
use Wx qw(wxTheApp :id :timer);
|
||||||
use Wx::Event qw(EVT_TIMER);
|
use Wx::Event qw(EVT_TIMER);
|
||||||
|
use Slic3r::Print::State ':steps';
|
||||||
|
|
||||||
has 'config' => (is => 'ro', required => 1);
|
has 'config' => (is => 'ro', required => 1);
|
||||||
has 'config2' => (is => 'ro', required => 1);
|
has 'config2' => (is => 'ro', required => 1);
|
||||||
@ -447,6 +448,18 @@ sub is_printing {
|
|||||||
sub set_print {
|
sub set_print {
|
||||||
my ($self, $print) = @_;
|
my ($self, $print) = @_;
|
||||||
|
|
||||||
|
# make sure layers were sliced
|
||||||
|
{
|
||||||
|
my $progress_dialog;
|
||||||
|
foreach my $object (@{$print->objects}) {
|
||||||
|
next if $object->step_done(STEP_SLICE);
|
||||||
|
$progress_dialog //= Wx::ProgressDialog->new('Slicing…', "Processing layers…", 100, undef, 0);
|
||||||
|
$progress_dialog->Pulse;
|
||||||
|
$object->slice;
|
||||||
|
}
|
||||||
|
$progress_dialog->Destroy if $progress_dialog;
|
||||||
|
}
|
||||||
|
|
||||||
$self->_print($print);
|
$self->_print($print);
|
||||||
|
|
||||||
# sort layers by Z
|
# sort layers by Z
|
||||||
|
Loading…
x
Reference in New Issue
Block a user