diff options
Diffstat (limited to 'src/slic3r/GUI/Jobs/PlaterWorker.hpp')
-rw-r--r-- | src/slic3r/GUI/Jobs/PlaterWorker.hpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/slic3r/GUI/Jobs/PlaterWorker.hpp b/src/slic3r/GUI/Jobs/PlaterWorker.hpp index 58bd1ec32..37b18b3b8 100644 --- a/src/slic3r/GUI/Jobs/PlaterWorker.hpp +++ b/src/slic3r/GUI/Jobs/PlaterWorker.hpp @@ -38,22 +38,18 @@ class PlaterWorker: public Worker { void update_status(int st, const std::string &msg = "") override { - wxWakeUpIdle(); ctl.update_status(st, msg); - - // If the worker is not using additional threads, the UI - // is refreshed with this call. If the worker is running - // in it's own thread, the yield should not have any - // visible effects. - wxYieldIfNeeded(); + wxWakeUpIdle(); } bool was_canceled() const override { return ctl.was_canceled(); } std::future<void> call_on_main_thread(std::function<void()> fn) override { + auto ftr = ctl.call_on_main_thread(std::move(fn)); wxWakeUpIdle(); - return ctl.call_on_main_thread(std::move(fn)); + + return ftr; } } wctl{c}; |