Skip to content

Commit

Permalink
fixed triangle not rotating step by step with snapping checked
Browse files Browse the repository at this point in the history
  • Loading branch information
kaamui committed Oct 16, 2024
1 parent 7ff7293 commit 16c8a17
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tools/UBGraphicsTriangle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -882,7 +882,7 @@ void UBGraphicsTriangle::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
mCursorRotationAngle = std::fmod(mCursorRotationAngle + lastLine.angleTo(currentLine), 360.);
qreal newAngle = mItemRotationAngle + mCursorRotationAngle;

if (event->modifiers().testFlag(Qt::ShiftModifier))
if (scene()->isSnapping())
{
qreal step = UBSettings::settings()->rotationAngleStep->get().toReal();
newAngle = qRound(newAngle / step) * step;
Expand Down

0 comments on commit 16c8a17

Please sign in to comment.