Browse Source

Pull request #5561: REPORT-58081 决策报表-绝对布局下,选中多个组件复制,粘贴到另一个绝对布局模板中,现在不能粘贴得到所有复制的组件了,只得到一个组件;8.2的persist还可以多个复制粘贴

Merge in DESIGN/design from ~FANGLEI/design10.0:release/11.0 to release/11.0

* commit '3aa40ce403eb2f330a747908db5335a3b131455e':
  REPORT-58081 决策报表-绝对布局下,选中多个组件复制,粘贴到另一个绝对布局模板中,现在不能粘贴得到所有复制的组件了,只得到一个组件;8.2的persist还可以多个复制粘贴
fix-lag
fanglei 3 years ago
parent
commit
2997e1b254
  1. 2
      designer-form/src/main/java/com/fr/design/mainframe/FormSelection.java
  2. 16
      designer-form/src/main/java/com/fr/design/mainframe/FormSelectionUtils.java

2
designer-form/src/main/java/com/fr/design/mainframe/FormSelection.java

@ -109,7 +109,7 @@ public class FormSelection {
}
/**
* 是否是可以增加的
* 是否是可以增加组件到已选中组件里面
*
* @param creator 组件
* @return 是则返回true

16
designer-form/src/main/java/com/fr/design/mainframe/FormSelectionUtils.java

@ -84,24 +84,22 @@ public class FormSelectionUtils {
}
private static FormSelection filterFormSelection(FormSelection clipboard, XLayoutContainer parent) {
FormSelection newSelection = new FormSelection();
for (XCreator xCreator : clipboard.getSelectedCreators()) {
if (parent.acceptType(XWParameterLayout.class)) {
if (xCreator.canEnterIntoParaPane()) {
newSelection.addSelectedCreator(xCreator);
if (!xCreator.canEnterIntoParaPane()) {
clipboard.removeCreator(xCreator);
}
} else if (parent.acceptType(XWAbsoluteLayout.class)) {
if (xCreator.canEnterIntoAbsolutePane()) {
newSelection.addSelectedCreator(xCreator);
if (!xCreator.canEnterIntoAbsolutePane()) {
clipboard.removeCreator(xCreator);
}
} else if (parent.acceptType(XWFitLayout.class)) {
if (xCreator.canEnterIntoAdaptPane()) {
newSelection.addSelectedCreator(xCreator);
if (!xCreator.canEnterIntoAdaptPane()) {
clipboard.removeCreator(xCreator);
}
}
}
return newSelection;
return clipboard;
}
private static boolean isExtraContainer(XLayoutContainer parent) {

Loading…
Cancel
Save