summaryrefslogtreecommitdiffhomepage
path: root/pose-widget/pose-widget.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2017-09-08 21:29:55 +0200
committerStanislaw Halik <sthalik@misaki.pl>2017-09-08 21:29:55 +0200
commita258434aa3da53e46dc231c13e543318aa169141 (patch)
treeca8f49eacb515f8e3298750e315488b67bf353eb /pose-widget/pose-widget.cpp
parent945273ac61a699f2c05343f32259c514d359fb65 (diff)
pose-widget: fix race on startup
Diffstat (limited to 'pose-widget/pose-widget.cpp')
-rw-r--r--pose-widget/pose-widget.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/pose-widget/pose-widget.cpp b/pose-widget/pose-widget.cpp
index 6adf71d4..c6cda293 100644
--- a/pose-widget/pose-widget.cpp
+++ b/pose-widget/pose-widget.cpp
@@ -32,8 +32,6 @@ pose_transform::pose_transform(QWidget* dst) :
image.fill(Qt::transparent);
image2.fill(Qt::transparent);
-
- start();
}
pose_transform::~pose_transform()
@@ -50,6 +48,9 @@ void pose_widget::paintEvent(QPaintEvent* event)
{
p.drawImage(event->rect(), image, QRect(0, 0, pose_transform::w, pose_transform::h));
});
+
+ if (!xform.isRunning())
+ xform.start();
}
void pose_transform::run()
@@ -242,7 +243,6 @@ void pose_transform::project_quad_texture()
const int dest_depth = image.depth() / 8;
static constexpr int const_depth = 4;
-
if (unlikely(orig_depth != const_depth || dest_depth != const_depth))
{
qDebug() << "pose-widget: octopus must be saved as .png with 32 bits pixel";