diff --git a/lib/Slic3r/Format/STL.pm b/lib/Slic3r/Format/STL.pm index abdef000e..1e30394dd 100644 --- a/lib/Slic3r/Format/STL.pm +++ b/lib/Slic3r/Format/STL.pm @@ -121,12 +121,11 @@ sub read_file { sub _read_ascii { my ($fh, $facets) = @_; - my $point_re = qr/([^ ]+)\s+([^ ]+)\s+([^ ]+)\s*$/; + my $point_re = qr/([^ ]+)\s+([^ ]+)\s+([^ ]+)/; my $facet; seek $fh, 0, 0; while (my $_ = <$fh>) { - s/\R+$//; if (!$facet) { /^\s*facet\s+normal\s+$point_re/ or next; $facet = [ [$1, $2, $3] ]; @@ -135,7 +134,7 @@ sub _read_ascii { push @$facets, $facet; undef $facet; } else { - /^\s*vertex\s+$point_re/ or next; + /^\s*vertex\s+$point_re/o or next; push @$facet, [map $_ * 1, $1, $2, $3]; } } diff --git a/lib/Slic3r/GUI/Dashboard.pm b/lib/Slic3r/GUI/Dashboard.pm index 052ed10d4..945675da3 100644 --- a/lib/Slic3r/GUI/Dashboard.pm +++ b/lib/Slic3r/GUI/Dashboard.pm @@ -139,9 +139,12 @@ sub load_file { $Slic3r::GUI::SkeinPanel::last_input_file = $input_file; + my $process_dialog = Wx::ProgressDialog->new('Loading...', "Processing input file...", 100, $self, 0); + $process_dialog->Pulse; local $SIG{__WARN__} = Slic3r::GUI::warning_catcher($self); my $object = $self->{print}->add_object_from_file($input_file); my $obj_idx = $#{$self->{print}->objects}; + $process_dialog->Destroy; $self->{list}->InsertStringItem($obj_idx, basename($input_file)); $self->{list}->SetItem($obj_idx, 1, "1");