diff options
-rw-r--r-- | pose-widget/pose-widget.cpp | 6 | ||||
-rw-r--r-- | pose-widget/pose-widget.hpp | 2 |
2 files changed, 4 insertions, 4 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"; diff --git a/pose-widget/pose-widget.hpp b/pose-widget/pose-widget.hpp index 7bc66cd2..ba94e233 100644 --- a/pose-widget/pose-widget.hpp +++ b/pose-widget/pose-widget.hpp @@ -46,7 +46,7 @@ public: bool barycentric_coords(const vec2& px, vec2& uv, int& i) const; }; -struct pose_transform final : private QThread +struct pose_transform final : QThread { pose_transform(QWidget* dst); ~pose_transform(); |