Browse Source

REPORT-59932 【固定布局-原布局推荐4.1】剪切问题

research/11.0
kerry 3 years ago
parent
commit
5d7f2db6a7
  1. 20
      designer-form/src/main/java/com/fr/design/designer/beans/models/SelectionModel.java

20
designer-form/src/main/java/com/fr/design/designer/beans/models/SelectionModel.java

@ -140,11 +140,28 @@ public class SelectionModel {
if (cutSelection != null) {
cutSelection.cut2ClipBoard(clipboard);
designer.getEditListenerTable().fireCreatorModified(DesignerEvent.CREATOR_CUTED);
setSelectedCreator(ifSelectParaComponent() ? designer.getParaComponent() : designer.getRootComponent());
designer.repaint();
}
}
}
/**
* 判断是否选中参数面板中的组件
* @return boolean
*/
private boolean ifSelectParaComponent() {
XCreator[] roots = selection.getSelectedCreators();
if (roots.length > 0) {
for (XCreator creator : roots) {
if ((creator.getParent() instanceof XWParameterLayout)) {
return true;
}
}
}
return false;
}
/**
* 复制当前选中的组件到剪切板
*/
@ -320,8 +337,7 @@ public class SelectionModel {
}
designer.getEditListenerTable().fireCreatorModified(DesignerEvent.CREATOR_DELETED);
setSelectedCreator(isInPara ? designer.getParaComponent() : designer.getRootComponent());
setSelectedCreator(isInPara? designer.getParaComponent() : designer.getRootComponent());
// 触发事件
designer.repaint();

Loading…
Cancel
Save