mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-10 17:22:09 +10:00
optimize selection rect
This commit is contained in:
+2
-1
@@ -732,8 +732,9 @@ public class Presenter implements IPlugInPort {
|
|||||||
} else if (selectedComponents.isEmpty()) {
|
} else if (selectedComponents.isEmpty()) {
|
||||||
// If there's no selection, the only thing to do is update the
|
// If there's no selection, the only thing to do is update the
|
||||||
// selection rectangle and refresh.
|
// selection rectangle and refresh.
|
||||||
|
Rectangle oldSelectionRect = selectionRect == null ? null : new Rectangle(selectionRect);
|
||||||
this.selectionRect = Utils.createRectangle(scaledPoint, previousDragPoint);
|
this.selectionRect = Utils.createRectangle(scaledPoint, previousDragPoint);
|
||||||
repaint = true;
|
repaint = !selectionRect.equals(oldSelectionRect);
|
||||||
// messageDispatcher.dispatchMessage(EventType.SELECTION_RECT_CHANGED,
|
// messageDispatcher.dispatchMessage(EventType.SELECTION_RECT_CHANGED,
|
||||||
// selectionRect);
|
// selectionRect);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user