diff options
Diffstat (limited to 'cv/video-widget.cpp')
-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(); |