diff --git a/src/app/puzzle/vpgraphicspiece.cpp b/src/app/puzzle/vpgraphicspiece.cpp index d369e98ea..3ee802c11 100644 --- a/src/app/puzzle/vpgraphicspiece.cpp +++ b/src/app/puzzle/vpgraphicspiece.cpp @@ -109,6 +109,7 @@ void VPGraphicsPiece::Init() connect(m_piece, &VPPiece::SelectionChanged, this, &VPGraphicsPiece::on_PieceSelectionChanged); connect(m_piece, &VPPiece::PositionChanged, this, &VPGraphicsPiece::on_PiecePositionChanged); connect(m_piece, &VPPiece::RotationChanged, this, &VPGraphicsPiece::on_PieceRotationChanged); + connect(m_piece, &VPPiece::PropertiesChanged, this, &VPGraphicsPiece::on_PiecePropertiesChanged); } //--------------------------------------------------------------------------------------------------------------------- @@ -168,7 +169,7 @@ void VPGraphicsPiece::paint(QPainter *painter, const QStyleOptionGraphicsItem *o } // paint the seam line - if(!m_seamLine.isEmpty()) + if(!m_seamLine.isEmpty() && m_piece->GetShowSeamLine()) { painter->drawPath(m_seamLine); } @@ -370,6 +371,15 @@ void VPGraphicsPiece::on_PieceRotationChanged() setRotation(-m_piece->GetRotation()); } +//--------------------------------------------------------------------------------------------------------------------- +void VPGraphicsPiece::on_PiecePropertiesChanged() +{ + if(scene()) + { + scene()->update(); + } +} + //--------------------------------------------------------------------------------------------------------------------- QVariant VPGraphicsPiece::itemChange(GraphicsItemChange change, const QVariant &value) { diff --git a/src/app/puzzle/vpgraphicspiece.h b/src/app/puzzle/vpgraphicspiece.h index 858c4a177..03c543cf8 100644 --- a/src/app/puzzle/vpgraphicspiece.h +++ b/src/app/puzzle/vpgraphicspiece.h @@ -63,6 +63,11 @@ public slots: */ void on_PieceRotationChanged(); + /** + * @brief on_PiecePropertiesChanged Slot called when the showSeamline / mirrored was changed + */ + void on_PiecePropertiesChanged(); + protected: QRectF boundingRect() const override; QPainterPath shape() const override;