From 7a60015ba99125b493d1cb85afc072bcebb97681 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Fri, 28 Jul 2017 16:23:55 +0200 Subject: gui: don't update the main window if it's hidden --- pose-widget/pose-widget.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'pose-widget/pose-widget.cpp') diff --git a/pose-widget/pose-widget.cpp b/pose-widget/pose-widget.cpp index 65f4c1e8..f2976a5d 100644 --- a/pose-widget/pose-widget.cpp +++ b/pose-widget/pose-widget.cpp @@ -9,6 +9,7 @@ #include "compat/util.hpp" #include "compat/timer.hpp" #include "compat/sleep.hpp" +#include "compat/check-visible.hpp" #include #include #include @@ -86,6 +87,9 @@ pose_widget::~pose_widget() void pose_widget::rotate_async(double xAngle, double yAngle, double zAngle, double x, double y, double z) { + if (!check_is_visible()) + return; + bool expected = true; if (xform.fresh.compare_exchange_weak(expected, false)) { -- cgit v1.2.3