|
|
|
@ -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(); |
|
|
|
|