Browse Source

Pull request #2065: REPORT-36200 【name63/user63】在控件右下方多次复制,并不会不断向右下复制

Merge in DESIGN/design from ~HENRY.WANG/design:release/10.0 to release/10.0

* commit '144ca48d0f3b22ad3873207c71812fa0581be689':
  REPORT-36200 【name63/user63】在控件右下方多次复制,并不会不断向右下复制
feature/big-screen
Henry.Wang 4 years ago
parent
commit
79c793d276
  1. 7
      designer-form/src/main/java/com/fr/design/mainframe/FormSelectionUtils.java

7
designer-form/src/main/java/com/fr/design/mainframe/FormSelectionUtils.java

@ -94,6 +94,7 @@ public class FormSelectionUtils {
designer.getSelectionModel().getSelection().reset();
Rectangle rec = clipboard.getSelctionBounds();
boolean addSuccess = false;
for (XCreator creator : clipboard.getSelectedCreators()) {
try {
XCreator copiedCreator = copyXcreator(designer.getTarget(), creator);
@ -107,7 +108,7 @@ public class FormSelectionUtils {
return;
}
resetTabSub2RealSize(copiedCreator);
boolean addSuccess = adapter.addBean(copiedCreator, point.x, point.y);
addSuccess = adapter.addBean(copiedCreator, point.x, point.y);
if (addSuccess) {
designer.getSelectionModel().getSelection().addSelectedCreator(copiedCreator);
}
@ -115,7 +116,9 @@ public class FormSelectionUtils {
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
}
rebuildSelection(designer);
if (!addSuccess) {
rebuildSelection(designer);
}
designer.getEditListenerTable().fireCreatorModified(
designer.getSelectionModel().getSelection().getSelectedCreator(), DesignerEvent.CREATOR_PASTED);

Loading…
Cancel
Save