From e324f2ea84d0ff8613adfebdb2ec4a1571bb46cd Mon Sep 17 00:00:00 2001 From: kerry Date: Fri, 25 Sep 2020 16:59:16 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-40553=20=E5=86=B3=E7=AD=96=E6=8A=A5?= =?UTF-8?q?=E8=A1=A8-=E8=BF=9E=E7=BB=AD=E7=82=B9=E5=87=BB=E7=A9=BA?= =?UTF-8?q?=E7=99=BD=E8=AE=BE=E8=AE=A1=E9=9D=A2=E6=9D=BF=EF=BC=8Cbody?= =?UTF-8?q?=E6=B2=A1=E6=9C=89=E5=A4=84=E4=BA=8E=E6=9C=AA=E9=80=89=E4=B8=AD?= =?UTF-8?q?=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/mainframe/EditingMouseListener.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/mainframe/EditingMouseListener.java b/designer-form/src/main/java/com/fr/design/mainframe/EditingMouseListener.java index 0e66964b4..f275fa312 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/EditingMouseListener.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/EditingMouseListener.java @@ -166,7 +166,7 @@ public class EditingMouseListener extends MouseInputAdapter { // 获取焦点,以便获取热键 designer.requestFocus(); } - if (e.getButton() == MouseEvent.BUTTON1) { + if (e.getButton() == MouseEvent.BUTTON1 && e.getX() > 0 && e.getY() > 0) { Direction dir = selectionModel.getDirectionAt(e); if (!DesignerMode.isAuthorityEditing()) { @@ -177,13 +177,10 @@ public class EditingMouseListener extends MouseInputAdapter { if (designer.isDrawLineMode()) { designer.updateDrawLineMode(e); } else { - int relativeX = Math.max(0, e.getX()); - int relativeY = Math.max(0, e.getY()); - if (selectionModel.hasSelectionComponent() && selectionModel.getSelection().getRelativeBounds().contains( - designer.getHorizontalScaleValue() + relativeX, - designer.getVerticalScaleValue() + relativeY)) { + designer.getHorizontalScaleValue() + e.getX(), + designer.getVerticalScaleValue() + e.getY())) { lastPressEvent = e; lastXCreator = selectionModel.getSelection().getSelectedCreator(); } else {