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 dde94561d9..de03fb61b5 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 @@ -198,6 +198,7 @@ public class EditingMouseListener extends MouseInputAdapter { } lastPressEvent = null; lastXCreator = null; + designer.stopDragging(); e.translatePoint(oldX - e.getX(), oldY - e.getY()); if (isAutoFire(transEvent, clickEvent)) { // click只有在mouseReleased和mousePressed前后x/y坐标相等时才会被触发在mouseReleased之后 diff --git a/designer-form/src/main/java/com/fr/design/mainframe/FormCreatorDropTarget.java b/designer-form/src/main/java/com/fr/design/mainframe/FormCreatorDropTarget.java index 2e4a5e6d4c..66a0edeea3 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/FormCreatorDropTarget.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/FormCreatorDropTarget.java @@ -168,21 +168,21 @@ public class FormCreatorDropTarget extends DropTarget { private void entering(int x, int y) { // 将要添加的组件图标移动到鼠标下的位置 - designer.getDraggingModel().moveTo(x, y); + designer.updateDraggingPosition(x, y); designer.repaint(); } private void exiting() { cancelPromptWidgetForbidEnter(); // 隐藏组件图标 - designer.getDraggingModel().reset(); + designer.resetDraggingPosition(); designer.setPainter(null); designer.repaint(); } private void hovering(int x, int y) { // 当前位置移植鼠标e所在的位置 - designer.getDraggingModel().moveTo(x, y); + designer.updateDraggingPosition(x, y); // 获取e所在的焦点组件 XCreator hotspot = designer.getComponentAt(x, y); // 获取焦点组件所在的焦点容器 diff --git a/designer-form/src/main/java/com/fr/design/mainframe/FormDesigner.java b/designer-form/src/main/java/com/fr/design/mainframe/FormDesigner.java index ecf67bf544..66626b1711 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/FormDesigner.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/FormDesigner.java @@ -785,6 +785,31 @@ public class FormDesigner extends TargetComponent