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,