Browse Source

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

feature/big-screen
Henry.Wang 4 years ago
parent
commit
aa97055659
  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(); designer.getSelectionModel().getSelection().reset();
Rectangle rec = clipboard.getSelctionBounds(); Rectangle rec = clipboard.getSelctionBounds();
boolean addSuccess = false;
for (XCreator creator : clipboard.getSelectedCreators()) { for (XCreator creator : clipboard.getSelectedCreators()) {
try { try {
XCreator copiedCreator = copyXcreator(designer.getTarget(), creator); XCreator copiedCreator = copyXcreator(designer.getTarget(), creator);
@ -107,7 +108,7 @@ public class FormSelectionUtils {
return; return;
} }
resetTabSub2RealSize(copiedCreator); resetTabSub2RealSize(copiedCreator);
boolean addSuccess = adapter.addBean(copiedCreator, point.x, point.y); addSuccess = adapter.addBean(copiedCreator, point.x, point.y);
if (addSuccess) { if (addSuccess) {
designer.getSelectionModel().getSelection().addSelectedCreator(copiedCreator); designer.getSelectionModel().getSelection().addSelectedCreator(copiedCreator);
} }
@ -115,7 +116,9 @@ public class FormSelectionUtils {
FineLoggerFactory.getLogger().error(e.getMessage(), e); FineLoggerFactory.getLogger().error(e.getMessage(), e);
} }
} }
rebuildSelection(designer); if (!addSuccess) {
rebuildSelection(designer);
}
designer.getEditListenerTable().fireCreatorModified( designer.getEditListenerTable().fireCreatorModified(
designer.getSelectionModel().getSelection().getSelectedCreator(), DesignerEvent.CREATOR_PASTED); designer.getSelectionModel().getSelection().getSelectedCreator(), DesignerEvent.CREATOR_PASTED);

Loading…
Cancel
Save