Browse Source

Pull request #3007: REPORT-43795 表单拖拽组件有问题,报表块可以通过body拖入参数面板

Merge in DESIGN/design from ~HADES/design:release/10.0 to release/10.0

* commit '0de544a588455af588e45f702fcd2785b1521f59':
  REPORT-43795 表单拖拽组件有问题,报表块可以通过body拖入参数面板
  REPORT-43814 组件复用插件在设计器启动的时候会初始化两遍
feature/big-screen
Hades 4 years ago
parent
commit
0ad5b29abb
  1. 9
      designer-form/src/main/java/com/fr/design/designer/beans/models/StateModel.java

9
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,

Loading…
Cancel
Save