mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-24 07:03:59 -06:00
Merge branch 'xs-config'
Conflicts: lib/Slic3r/Config.pm xs/MANIFEST
This commit is contained in:
commit
ab25cc4940
19 changed files with 2370 additions and 1235 deletions
|
@ -733,6 +733,9 @@ sub export_gcode {
|
|||
catch_error => sub { Slic3r::GUI::catch_error($self, @_) && $self->on_export_failed },
|
||||
);
|
||||
}
|
||||
|
||||
# this method gets executed in a separate thread by wxWidgets since it's a button handler
|
||||
Slic3r::thread_cleanup() if $Slic3r::have_threads;
|
||||
}
|
||||
|
||||
sub export_gcode2 {
|
||||
|
@ -802,6 +805,9 @@ sub export_stl {
|
|||
my $output_file = $self->_get_export_file('STL') or return;
|
||||
Slic3r::Format::STL->write_file($output_file, $self->{model}, binary => 1);
|
||||
$self->statusbar->SetStatusText("STL file exported to $output_file");
|
||||
|
||||
# this method gets executed in a separate thread by wxWidgets since it's a button handler
|
||||
Slic3r::thread_cleanup() if $Slic3r::have_threads;
|
||||
}
|
||||
|
||||
sub export_amf {
|
||||
|
@ -810,6 +816,9 @@ sub export_amf {
|
|||
my $output_file = $self->_get_export_file('AMF') or return;
|
||||
Slic3r::Format::AMF->write_file($output_file, $self->{model});
|
||||
$self->statusbar->SetStatusText("AMF file exported to $output_file");
|
||||
|
||||
# this method gets executed in a separate thread by wxWidgets since it's a menu handler
|
||||
Slic3r::thread_cleanup() if $Slic3r::have_threads;
|
||||
}
|
||||
|
||||
sub _get_export_file {
|
||||
|
@ -853,7 +862,9 @@ sub make_thumbnail {
|
|||
};
|
||||
|
||||
@_ = ();
|
||||
$Slic3r::have_threads ? threads->create($cb)->detach : $cb->();
|
||||
$Slic3r::have_threads
|
||||
? threads->create(sub { $cb->(); Slic3r::thread_cleanup(); })->detach
|
||||
: $cb->();
|
||||
}
|
||||
|
||||
sub on_thumbnail_made {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue