diff --git a/src/app/puzzle/scene/vpgraphicspiececontrols.cpp b/src/app/puzzle/scene/vpgraphicspiececontrols.cpp index f90a5fd04..37c669b9e 100644 --- a/src/app/puzzle/scene/vpgraphicspiececontrols.cpp +++ b/src/app/puzzle/scene/vpgraphicspiececontrols.cpp @@ -395,7 +395,7 @@ void VPGraphicsPieceControls::mousePressEvent(QGraphicsSceneMouseEvent *event) m_rotationStartPoint = event->scenePos(); m_rotationSum = 0; m_controlsVisible = false; - m_handleCorner = HandleCorner(event->scenePos()); + m_handleCorner = SelectedHandleCorner(event->scenePos()); m_ignorePieceTransformation = true; prepareGeometryChange(); } @@ -409,7 +409,7 @@ void VPGraphicsPieceControls::mousePressEvent(QGraphicsSceneMouseEvent *event) void VPGraphicsPieceControls::mouseMoveEvent(QGraphicsSceneMouseEvent *event) { if((event->modifiers() & Qt::ShiftModifier) != 0U - && static_cast(m_handleCorner) != HandleCorner::Invalid) + && static_cast(m_handleCorner) != HandleCorner::Invalid) { if (not m_originSaved) { @@ -426,19 +426,19 @@ void VPGraphicsPieceControls::mouseMoveEvent(QGraphicsSceneMouseEvent *event) VPTransformationOrigon origin; origin.custom = true; - if (static_cast(m_handleCorner) == HandleCorner::TopLeft) + if (static_cast(m_handleCorner) == HandleCorner::TopLeft) { origin.origin = m_pieceRect.topLeft(); } - else if (static_cast(m_handleCorner) == HandleCorner::TopRight) + else if (static_cast(m_handleCorner) == HandleCorner::TopRight) { origin.origin = m_pieceRect.topRight(); } - else if (static_cast(m_handleCorner) == HandleCorner::BottomRight) + else if (static_cast(m_handleCorner) == HandleCorner::BottomRight) { origin.origin = m_pieceRect.bottomRight(); } - else if (static_cast(m_handleCorner) == HandleCorner::BottomLeft) + else if (static_cast(m_handleCorner) == HandleCorner::BottomLeft) { origin.origin = m_pieceRect.bottomLeft(); } @@ -831,7 +831,7 @@ auto VPGraphicsPieceControls::PiecesBoundingRect(const QList &select } //--------------------------------------------------------------------------------------------------------------------- -auto VPGraphicsPieceControls::HandleCorner(const QPointF &pos) const -> int +auto VPGraphicsPieceControls::SelectedHandleCorner(const QPointF &pos) const -> int { if (TopLeftControl().boundingRect().contains(pos)) { diff --git a/src/app/puzzle/scene/vpgraphicspiececontrols.h b/src/app/puzzle/scene/vpgraphicspiececontrols.h index 5c6691590..985681cf6 100644 --- a/src/app/puzzle/scene/vpgraphicspiececontrols.h +++ b/src/app/puzzle/scene/vpgraphicspiececontrols.h @@ -129,7 +129,7 @@ private: auto ArrowPath() const -> QPainterPath; - auto HandleCorner(const QPointF &pos) const -> int; + auto SelectedHandleCorner(const QPointF &pos) const -> int; auto SelectedPieces() const -> QList; static auto PiecesBoundingRect(const QList &selectedPieces) -> QRectF;