Work in progress: Good bye, Perl Threads!

This commit is contained in:
bubnikv 2018-03-23 11:41:20 +01:00
parent 86b79f89ad
commit e931f75010
31 changed files with 833 additions and 1069 deletions

View file

@ -38,11 +38,6 @@ has 'duplicate_grid' => (
default => sub { [1,1] },
);
has 'status_cb' => (
is => 'rw',
default => sub { sub {} },
);
has 'print_center' => (
is => 'rw',
default => sub { Slic3r::Pointf->new(100,100) },
@ -90,35 +85,16 @@ sub set_model {
}
}
sub _before_export {
my ($self) = @_;
$self->_print->set_status_cb($self->status_cb);
$self->_print->validate;
}
sub _after_export {
my ($self) = @_;
$self->_print->set_status_cb(undef);
}
sub export_gcode {
my ($self) = @_;
$self->_before_export;
$self->_print->export_gcode(output_file => $self->output_file);
$self->_after_export;
$self->_print->validate;
$self->_print->export_gcode($self->output_file // '');
}
sub export_svg {
my ($self) = @_;
$self->_before_export;
$self->_print->validate;
$self->_print->export_svg(output_file => $self->output_file);
$self->_after_export;
}
1;