From 0de544a588455af588e45f702fcd2785b1521f59 Mon Sep 17 00:00:00 2001 From: hades Date: Wed, 2 Dec 2020 19:16:19 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-43795=20=E8=A1=A8=E5=8D=95=E6=8B=96?= =?UTF-8?q?=E6=8B=BD=E7=BB=84=E4=BB=B6=E6=9C=89=E9=97=AE=E9=A2=98=EF=BC=8C?= =?UTF-8?q?=E6=8A=A5=E8=A1=A8=E5=9D=97=E5=8F=AF=E4=BB=A5=E9=80=9A=E8=BF=87?= =?UTF-8?q?body=E6=8B=96=E5=85=A5=E5=8F=82=E6=95=B0=E9=9D=A2=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/design/mainframe/JTemplate.java | 6 +----- .../com/fr/design/designer/beans/models/StateModel.java | 9 +++++++++ 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java b/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java index d05200592..6c6de287e 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java @@ -145,11 +145,7 @@ public abstract class JTemplate> } private void initAndStartPlugin() { - // 启动设计器的时候不加载插件内容,插件引擎监听会加载一次 - boolean init = (DesignerContext.getDesignerFrame() != null && DesignerContext.getDesignerFrame().isDesignerOpened()) || DesignerEnvManager.getEnvManager().isEmbedServerLazyStartup(); - if (init) { - initPluginPane(); - } + initPluginPane(); startListenPlugin(); } diff --git a/designer-form/src/main/java/com/fr/design/designer/beans/models/StateModel.java b/designer-form/src/main/java/com/fr/design/designer/beans/models/StateModel.java index 5045e1387..85a328032 100644 --- a/designer-form/src/main/java/com/fr/design/designer/beans/models/StateModel.java +++ b/designer-form/src/main/java/com/fr/design/designer/beans/models/StateModel.java @@ -4,6 +4,7 @@ import com.fr.design.beans.location.Absorptionline; import com.fr.design.designer.beans.AdapterBus; import com.fr.design.designer.beans.HoverPainter; import com.fr.design.designer.beans.LayoutAdapter; +import com.fr.design.designer.beans.adapters.layout.FRParameterLayoutAdapter; import com.fr.design.designer.beans.events.DesignerEvent; import com.fr.design.designer.beans.location.Direction; import com.fr.design.designer.beans.location.Location; @@ -136,6 +137,14 @@ public class StateModel { private boolean addBean(XLayoutContainer container, int mouseX, int mouseY) { LayoutAdapter adapter = container.getLayoutAdapter(); Rectangle rectangleContainer = ComponentUtils.getRelativeBounds(container); + // 判断是否能把控件从表单布局中拖拽到参数面板中 + if (adapter instanceof FRParameterLayoutAdapter) { + for (XCreator xCreator : selectionModel.getSelection().getSelectedCreators()) { + if (!xCreator.canEnterIntoParaPane()) { + return false; + } + } + } if (selectionModel.getSelection().size() == 1) { return adapter.addBean(selectionModel.getSelection().getSelectedCreator(), mouseX + designer.getArea().getHorizontalValue() - rectangleContainer.x,