Skip to content

Commit 703a5bc

Browse files
committed
change the move constrain key to Ctrl
1 parent fc87065 commit 703a5bc

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/qml/modules/Shotcut/Controls/RectangleControl.qml

+7-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2014-2022 Meltytech, LLC
2+
* Copyright (c) 2014-2025 Meltytech, LLC
33
*
44
* This program is free software: you can redistribute it and/or modify
55
* it under the terms of the GNU General Public License as published by
@@ -300,7 +300,7 @@ Item {
300300
newX = Math.min(Math.max(rectangle.x, 0), widthScale * profile.width - rectangle.width);
301301
newY = Math.min(Math.max(rectangle.y, 0), heightScale * profile.height - rectangle.height);
302302
}
303-
if (mouse.modifiers & Qt.ShiftModifier) {
303+
if (mouse.modifiers & Qt.ControlModifier) {
304304
var deltaX = Math.abs(startX - newX);
305305
var deltaY = Math.abs(startY - newY);
306306
if (deltaX < deltaY) {
@@ -311,9 +311,11 @@ Item {
311311
newY = startY;
312312
}
313313
}
314-
rectangle.x = newX;
315-
rectangle.y = newY;
316-
rectChanged(rectangle);
314+
if (newX && newY) {
315+
rectangle.x = newX;
316+
rectangle.y = newY;
317+
rectChanged(rectangle);
318+
}
317319
}
318320
onReleased: {
319321
rectChanged(rectangle);

0 commit comments

Comments
 (0)