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 /cv | |
parent | 720026a79cd6aa33c4180f2241425cdd8829b36b (diff) |
gui: don't update the main window if it's hidden
Diffstat (limited to 'cv')
-rw-r--r-- | cv/video-widget.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/cv/video-widget.cpp b/cv/video-widget.cpp index 7d504f3a..bad81905 100644 --- a/cv/video-widget.cpp +++ b/cv/video-widget.cpp @@ -7,6 +7,8 @@ */ #include "video-widget.hpp" +#include "compat/check-visible.hpp" + #include <opencv2/imgproc.hpp> cv_video_widget::cv_video_widget(QWidget* parent) : QWidget(parent), @@ -67,6 +69,9 @@ void cv_video_widget::paintEvent(QPaintEvent*) void cv_video_widget::update_and_repaint() { + if (!check_is_visible()) + return; + QMutexLocker l(&mtx); preview_size = size(); |