Fix cancellation from UI for UIThreadWorker

This commit is contained in:
tamasmeszaros 2022-05-27 15:54:26 +02:00
parent 9892893587
commit 6c284882ba

View file

@ -65,7 +65,10 @@ public:
explicit UIThreadWorker(std::shared_ptr<ProgressIndicator> pri,
const std::string & /*name*/ = "")
: m_progress{pri}
{}
{
if (m_progress)
m_progress->set_cancel_callback([this](){ cancel(); });
}
UIThreadWorker() = default;