Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 47312df6 authored by Tao Guo's avatar Tao Guo Committed by Henrik Fehlauer

Fix right/bottom edge jump issue when adjust rect

Summary:
right/bottom edge move unexpected when adjust left/top edge.
To fix this issue, just set x/y before width/height

Test Plan:
    1. select a rect, make sure the right/bottom edge is beside moniter edge
    2. drag the topleft, top, top right up or drage top left, left, bottom left to left quickly, the bottom/ right edge move unexpected

Reviewers: rkflx, ngraham, #spectacle

Reviewed By: rkflx, ngraham, #spectacle

Differential Revision: https://phabricator.kde.org/D11704
parent a147b75e
......@@ -81,13 +81,13 @@ Item {
onPositionChanged: {
if ((parent.x + mouse.x) < brxLimit) {
parent.width = parent.width - mouse.x;
parent.x = parent.x + mouse.x;
parent.width = parent.width - mouse.x;
}
if ((parent.y + mouse.y) < bryLimit) {
parent.height = parent.height - mouse.y;
parent.y = parent.y + mouse.y;
parent.height = parent.height - mouse.y;
}
drawCanvas.requestPaint();
......@@ -118,8 +118,8 @@ Item {
}
if ((parent.y + mouse.y) < bryLimit) {
parent.height = parent.height - mouse.y;
parent.y = parent.y + mouse.y;
parent.height = parent.height - mouse.y;
}
drawCanvas.requestPaint();
......@@ -146,8 +146,8 @@ Item {
onPositionChanged: {
if ((parent.x + mouse.x) < brxLimit) {
parent.width = parent.width - mouse.x;
parent.x = parent.x + mouse.x;
parent.width = parent.width - mouse.x;
}
if ((parent.y + parent.height + mouse.y) > bryLimit) {
......@@ -206,8 +206,8 @@ Item {
onPositionChanged: {
if ((parent.y + mouse.y) < limit) {
parent.height = parent.height - mouse.y;
parent.y = parent.y + mouse.y;
parent.height = parent.height - mouse.y;
}
drawCanvas.requestPaint();
......@@ -257,8 +257,8 @@ Item {
onPositionChanged: {
if ((parent.x + mouse.x) < limit) {
parent.width = parent.width - mouse.x;
parent.x = parent.x + mouse.x;
parent.width = parent.width - mouse.x;
}
drawCanvas.requestPaint();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment