mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 16:57:53 -06:00
Stop the ongoing slicing process when attempting to export.
This commit is contained in:
parent
033b7eb8ad
commit
797c812f31
2 changed files with 5 additions and 6 deletions
|
@ -398,6 +398,7 @@ sub on_plater_selection_changed {
|
||||||
|
|
||||||
sub slice_to_png {
|
sub slice_to_png {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
|
$self->{plater}->stop_background_process;
|
||||||
$self->{plater}->async_apply_config;
|
$self->{plater}->async_apply_config;
|
||||||
$appController->print_ctl()->slice_to_png();
|
$appController->print_ctl()->slice_to_png();
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,9 +20,7 @@ namespace Slic3r {
|
||||||
|
|
||||||
class AppControllerBoilerplate::PriData {
|
class AppControllerBoilerplate::PriData {
|
||||||
public:
|
public:
|
||||||
// using M = std::unordered_map<std::thread::id, ProgresIndicatorPtr>;
|
|
||||||
std::mutex m;
|
std::mutex m;
|
||||||
// M store;
|
|
||||||
std::thread::id ui_thread;
|
std::thread::id ui_thread;
|
||||||
|
|
||||||
inline explicit PriData(std::thread::id uit): ui_thread(uit) {}
|
inline explicit PriData(std::thread::id uit): ui_thread(uit) {}
|
||||||
|
@ -328,9 +326,9 @@ void PrintController::slice_to_png()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
std::async(supports_asynch()? std::launch::async : std::launch::deferred,
|
// std::async(supports_asynch()? std::launch::async : std::launch::deferred,
|
||||||
[this, exd, scale_back]()
|
// [this, exd, scale_back]()
|
||||||
{
|
// {
|
||||||
|
|
||||||
auto pri = create_progress_indicator(
|
auto pri = create_progress_indicator(
|
||||||
200, _(L("Slicing to zipped png files...")));
|
200, _(L("Slicing to zipped png files...")));
|
||||||
|
@ -362,7 +360,7 @@ void PrintController::slice_to_png()
|
||||||
print_->progressindicator = pbak;
|
print_->progressindicator = pbak;
|
||||||
scale_back();
|
scale_back();
|
||||||
|
|
||||||
});
|
// });
|
||||||
}
|
}
|
||||||
|
|
||||||
void IProgressIndicator::message_fmt(
|
void IProgressIndicator::message_fmt(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue