Browse Source

REPORT-40606 【回归测试】表单模板如果未选择组件进行多次拖动,再切换模板就不行了,报错

feature/big-screen
pengda 4 years ago
parent
commit
80a151dfa4
  1. 6
      designer-form/src/main/java/com/fr/design/mainframe/FormDesigner.java

6
designer-form/src/main/java/com/fr/design/mainframe/FormDesigner.java

@ -1337,6 +1337,9 @@ public class FormDesigner extends TargetComponent<Form> implements TreeSelection
// 当前选中控件可以上移一层吗? // 当前选中控件可以上移一层吗?
public boolean isCurrentComponentMovableUp() { public boolean isCurrentComponentMovableUp() {
XCreator creator = getSelectionModel().getSelection().getSelectedCreator(); XCreator creator = getSelectionModel().getSelection().getSelectedCreator();
if (null == creator) {
return false;
}
XLayoutContainer container = (XLayoutContainer) creator.getParent(); XLayoutContainer container = (XLayoutContainer) creator.getParent();
if (container == null || !container.supportInnerOrderChangeActions()) { if (container == null || !container.supportInnerOrderChangeActions()) {
return false; return false;
@ -1347,6 +1350,9 @@ public class FormDesigner extends TargetComponent<Form> implements TreeSelection
// 当前选中控件可以下移一层吗? // 当前选中控件可以下移一层吗?
public boolean isCurrentComponentMovableDown() { public boolean isCurrentComponentMovableDown() {
XCreator creator = getSelectionModel().getSelection().getSelectedCreator(); XCreator creator = getSelectionModel().getSelection().getSelectedCreator();
if (creator == null) {
return false;
}
XLayoutContainer container = (XLayoutContainer) creator.getParent(); XLayoutContainer container = (XLayoutContainer) creator.getParent();
if (container == null || !container.supportInnerOrderChangeActions()) { if (container == null || !container.supportInnerOrderChangeActions()) {
return false; return false;

Loading…
Cancel
Save