summaryrefslogtreecommitdiffhomepage
path: root/pose-widget/pose-widget.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2017-07-28 16:23:55 +0200
committerStanislaw Halik <sthalik@misaki.pl>2017-07-28 16:23:55 +0200
commit7a60015ba99125b493d1cb85afc072bcebb97681 (patch)
treec161b23b42e46cac98093f8cb0940fe35c42e0a1 /pose-widget/pose-widget.cpp
parent720026a79cd6aa33c4180f2241425cdd8829b36b (diff)
gui: don't update the main window if it's hidden
Diffstat (limited to 'pose-widget/pose-widget.cpp')
-rw-r--r--pose-widget/pose-widget.cpp4
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))
{