Bugfix: background processing was not triggered when loading files from command line. #3887

This commit is contained in:
Alessandro Ranellucci 2017-04-27 12:46:08 +02:00
parent 9adbae29a5
commit 3ddcb95211

View File

@ -323,7 +323,6 @@ sub new {
if ($self->{preview3D}) {
$self->{preview3D}->set_bed_shape($self->{config}->bed_shape);
}
$self->on_model_change;
{
my $presets = $self->{presets_sizer} = Wx::FlexGridSizer->new(3, 3, 1, 2);
@ -887,6 +886,11 @@ sub load_file {
sub load_model_objects {
my ($self, @model_objects) = @_;
# Always restart background process when adding new objects.
# This prevents lack of processing in some circumstances when background process is
# running but adding a new object does not invalidate anything.
$self->stop_background_process;
my $bed_centerf = $self->bed_centerf;
my $bed_shape = Slic3r::Polygon->new_scale(@{$self->{config}->bed_shape});
my $bed_size = $bed_shape->bounding_box->size;