Skip to content

Commit 5720605

Browse files
committed
rotation snapping by 1 degree with ctrl/cmd modifier
1 parent 7215bb6 commit 5720605

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

src/core/canvasmouseinteractions.cpp

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -852,9 +852,14 @@ void Canvas::rotateSelected(const eMouseEvent& e)
852852
rot = d_rot + mRotHalfCycles*180;
853853
}
854854

855-
if (!mValueInput.inputEnabled() && e.shiftMod()) {
856-
constexpr qreal snapStep = 15.0;
857-
rot = std::round(rot / snapStep) * snapStep;
855+
if (!mValueInput.inputEnabled()) {
856+
if (e.ctrlMod()) {
857+
constexpr qreal snapStep = 1.0;
858+
rot = std::round(rot / snapStep) * snapStep;
859+
} else if (e.shiftMod()) {
860+
constexpr qreal snapStep = 15.0;
861+
rot = std::round(rot / snapStep) * snapStep;
862+
}
858863
}
859864

860865
if (mCurrentMode == CanvasMode::boxTransform) {

0 commit comments

Comments
 (0)