Fix cancellation from UI for UIThreadWorker
This commit is contained in:
parent
9892893587
commit
6c284882ba
1 changed files with 4 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue