mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-14 05:35:59 +08:00
Fix cancellation from UI for UIThreadWorker
This commit is contained in:
parent
9892893587
commit
6c284882ba
@ -65,7 +65,10 @@ public:
|
|||||||
explicit UIThreadWorker(std::shared_ptr<ProgressIndicator> pri,
|
explicit UIThreadWorker(std::shared_ptr<ProgressIndicator> pri,
|
||||||
const std::string & /*name*/ = "")
|
const std::string & /*name*/ = "")
|
||||||
: m_progress{pri}
|
: m_progress{pri}
|
||||||
{}
|
{
|
||||||
|
if (m_progress)
|
||||||
|
m_progress->set_cancel_callback([this](){ cancel(); });
|
||||||
|
}
|
||||||
|
|
||||||
UIThreadWorker() = default;
|
UIThreadWorker() = default;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user