Browse Source

REPORT-4634 组件叠加体验优化=>bug修改=>修复选中form报错的问题

master
plough 7 years ago
parent
commit
ea425ac074
  1. 2
      designer_form/src/com/fr/design/designer/beans/models/SelectionModel.java
  2. 6
      designer_form/src/com/fr/design/mainframe/FormDesigner.java

2
designer_form/src/com/fr/design/designer/beans/models/SelectionModel.java

@ -81,8 +81,10 @@ public class SelectionModel {
// 如果父层是scale和title两个专属容器,返回其父层,组件本身是不让被选中的
if (comp != designer.getRootComponent() && comp != designer.getParaComponent()) {
XCreator parentContainer = (XCreator) comp.getParent();
if (parentContainer != null) {
comp = parentContainer.isDedicateContainer() ? parentContainer : comp;
}
}
if (selection.removeSelectedCreator(comp) || selection.addSelectedCreator(comp)) {
designer.getEditListenerTable().fireCreatorModified(comp, DesignerEvent.CREATOR_SELECTED);
designer.repaint();

6
designer_form/src/com/fr/design/mainframe/FormDesigner.java

@ -1140,6 +1140,9 @@ public class FormDesigner extends TargetComponent<Form> implements TreeSelection
public boolean isCurrentComponentMovableUp() {
XCreator creator = getSelectionModel().getSelection().getSelectedCreator();
Container container = creator.getParent();
if (container == null) {
return false;
}
return creator.isMovable() && container.getComponentZOrder(creator) > 0;
}
@ -1147,6 +1150,9 @@ public class FormDesigner extends TargetComponent<Form> implements TreeSelection
public boolean isCurrentComponentMovableDown() {
XCreator creator = getSelectionModel().getSelection().getSelectedCreator();
Container container = creator.getParent();
if (container == null) {
return false;
}
return creator.isMovable() && container.getComponentZOrder(creator) < container.getComponentCount() - 1;
}

Loading…
Cancel
Save