improvement rotation initialisation

This commit is contained in:
Ronan Le Tiec 2020-05-09 15:13:00 +02:00
parent 3fc0924887
commit 0e87b10a66

View File

@ -187,9 +187,10 @@ void VPuzzleMainGraphicsView::on_PieceMovedToLayer(VPuzzlePiece *piece, VPuzzleL
} }
scene()->addItem(_graphicsPiece); scene()->addItem(_graphicsPiece);
_graphicsPiece->setPos(_graphicsPiece->GetPiece()->GetPosition()); // not very clean to directly call slots
_graphicsPiece->setSelected(_graphicsPiece->GetPiece()->GetIsSelected()); _graphicsPiece->on_PieceSelectionChanged();
_graphicsPiece->update(); _graphicsPiece->on_PiecePositionChanged();
_graphicsPiece->on_PieceRotationChanged();
} }
} }