diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2017-07-28 16:23:55 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2017-07-28 16:23:55 +0200 |
commit | 7a60015ba99125b493d1cb85afc072bcebb97681 (patch) | |
tree | c161b23b42e46cac98093f8cb0940fe35c42e0a1 /pose-widget | |
parent | 720026a79cd6aa33c4180f2241425cdd8829b36b (diff) |
gui: don't update the main window if it's hidden
Diffstat (limited to 'pose-widget')
-rw-r--r-- | pose-widget/pose-widget.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
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 <cmath> #include <algorithm> #include <QPainter> @@ -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)) { |