Browse Source

REPORT-4883 模板参数控件问题=>删除参数面板内的控件后,选中参数面板

master
plough 7 years ago
parent
commit
318f3ca76b
  1. 7
      designer_form/src/com/fr/design/designer/beans/models/SelectionModel.java

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

@ -227,7 +227,11 @@ public class SelectionModel {
XCreator[] roots = selection.getSelectedCreators();
if (roots.length > 0) {
boolean isInPara = true; // 在参数面板内删除控件
for (XCreator creator : roots) {
if (isInPara && !(creator.getParent() instanceof XWParameterLayout)) {
isInPara = false;
}
if (creator.acceptType(XWParameterLayout.class)) {
designer.removeParaComponent();
}
@ -236,8 +240,7 @@ public class SelectionModel {
// 清除被选中的组件
selection.reset();
}
setSelectedCreator(designer.getRootComponent());
FormSelectionUtils.rebuildSelection(designer);
setSelectedCreator(isInPara ? designer.getParaComponent() : designer.getRootComponent());
// 触发事件
designer.getEditListenerTable().fireCreatorModified(DesignerEvent.CREATOR_DELETED);
designer.repaint();

Loading…
Cancel
Save