diff --git a/src/ui/widget/canvas.cpp b/src/ui/widget/canvas.cpp index a9acea927eafd462d130092e06c1a011914849cb..1e5d7c4e2e6a8b3e5ae093d7a95ca8a371fad0d1 100644 --- a/src/ui/widget/canvas.cpp +++ b/src/ui/widget/canvas.cpp @@ -10,7 +10,7 @@ * * Released under GNU GPL v2+, read the file 'COPYING' for more information. */ - +#include #include #include @@ -964,10 +964,10 @@ Canvas::on_idle() if (!_drawing) { return false; // Disconnect } - - bool done = do_update(); + bool done = false; + std::thread t([&] {done = Inkscape::UI::Widget::Canvas::do_update();}); + t.join(); int n_rects = _clean_region->get_num_rectangles(); - // If we've drawn everything then we should have just one clean rectangle, covering the entire canvas. if (n_rects == 0) { std::cerr << "Canvas::on_idle: clean region is empty!" << std::endl;