From ee540035775dc508de3b6c6768f8e59fa9008793 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=B9=E7=A3=8A?= <294531121@qq.com> Date: Wed, 23 Mar 2022 17:44:06 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-68175=20FR11=E5=86=B3=E7=AD=96=E6=8A=A5?= =?UTF-8?q?=E8=A1=A8-=E7=BB=9D=E5=AF=B9=E5=B8=83=E5=B1=80frm=EF=BC=8C?= =?UTF-8?q?=E9=BC=A0=E6=A0=87=E5=9C=A8body=E6=B2=A1=E6=9C=89=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E7=9A=84=E7=A9=BA=E7=99=BD=E5=8C=BA=E5=9F=9F=EF=BC=8C?= =?UTF-8?q?=E7=82=B9=E5=87=BB=E7=84=B6=E5=90=8E=E6=8B=96=E6=8B=BD=EF=BC=8C?= =?UTF-8?q?=E4=BC=9A=E5=87=BA=E7=8E=B0=E7=BB=84=E4=BB=B6=E5=A4=A7=E5=B0=8F?= =?UTF-8?q?=E8=A2=AB=E6=8B=89=E4=BC=B8=E4=B8=94=E8=B6=85=E5=87=BAbody?= =?UTF-8?q?=E8=8C=83=E5=9B=B4=E7=9A=84=E9=94=99=E4=B9=B1=E7=8E=B0=E8=B1=A1?= =?UTF-8?q?=EF=BC=8C=E6=AD=A4=E6=97=B6=E7=82=B9=E5=9B=9E=E9=80=80=E6=8C=89?= =?UTF-8?q?=E9=92=AE=E4=BC=9A=E4=BD=BF=E6=A8=A1=E6=9D=BF=E5=8F=98=E4=B8=BA?= =?UTF-8?q?=E5=AE=BD=E5=BA=A6=E4=B8=BA1=E7=9A=84=E6=95=88=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../beans/adapters/layout/FRAbsoluteLayoutAdapter.java | 6 +++++- .../main/java/com/fr/design/mainframe/FormDesignerUI.java | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRAbsoluteLayoutAdapter.java b/designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRAbsoluteLayoutAdapter.java index 5bdfe3c29..5fb1025f3 100644 --- a/designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRAbsoluteLayoutAdapter.java +++ b/designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRAbsoluteLayoutAdapter.java @@ -4,6 +4,7 @@ import com.fr.design.beans.GroupModel; import com.fr.design.designer.beans.ConstraintsGroupModel; import com.fr.design.designer.beans.HoverPainter; import com.fr.design.designer.beans.models.DraggingModel; +import com.fr.design.designer.beans.models.StateModel; import com.fr.design.designer.beans.painters.FRAbsoluteLayoutPainter; import com.fr.design.designer.creator.*; import com.fr.design.designer.properties.BoundsGroupModel; @@ -353,7 +354,10 @@ public class FRAbsoluteLayoutAdapter extends FRBodyLayoutAdapter { public void dragging(DraggingModel model) { FormDesigner designer = model.getDesigner(); MouseEvent dragEvent = model.getCurrentDragEvent(); - designer.getStateModel().dragging(dragEvent); + StateModel stateModel = designer.getStateModel(); + if (stateModel.dragable()) { + stateModel.dragging(dragEvent); + } } @Override diff --git a/designer-form/src/main/java/com/fr/design/mainframe/FormDesignerUI.java b/designer-form/src/main/java/com/fr/design/mainframe/FormDesignerUI.java index 8307e945f..1f3a7caf5 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/FormDesignerUI.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/FormDesignerUI.java @@ -224,6 +224,9 @@ public class FormDesignerUI extends ComponentUI { } XCreator creator = draggingModel.getCreator(); + if (!creator.isSupportDrag()) { + return false; + } int leftTopX = draggingModel.getCreatorLeftTopX(); int leftTopY = draggingModel.getCreatorLeftTopY();