Browse Source

REPORT-62275

bugfix/11.0
方磊 3 years ago
parent
commit
0ae062a012
  1. 1
      designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRNoFixLayoutAdapter.java
  2. 5
      designer-form/src/main/java/com/fr/design/designer/beans/models/SelectionModel.java
  3. 5
      designer-form/src/main/java/com/fr/design/mainframe/FormCreatorDropTarget.java

1
designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRNoFixLayoutAdapter.java

@ -145,7 +145,6 @@ public class FRNoFixLayoutAdapter extends AbstractLayoutAdapter {
@Override
public void dragStart(XCreator xCreator, SelectionModel selectionModel) {
selectionModel.removeCreator(xCreator, xCreator.getWidth(), xCreator.getHeight());
selectionModel.fireCreatorDeleted();
selectionModel.setSelectedCreator(container);
}

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

@ -584,9 +584,4 @@ public class SelectionModel {
selection.setSelectedCreators(rebuildSelection);
fireCreatorSelected();
}
public void fireCreatorDeleted() {
designer.getEditListenerTable().fireCreatorModified(selection.getSelectedCreator(),
DesignerEvent.CREATOR_DELETED);
}
}

5
designer-form/src/main/java/com/fr/design/mainframe/FormCreatorDropTarget.java

@ -166,11 +166,12 @@ public class FormCreatorDropTarget extends DropTarget {
private void undoWhenDropFail() {
JTemplate<?, ?> jt = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate();
if (jt != null && jt.getUndoManager().canUndo()) {
if (jt != null) {
UIUtil.invokeLaterIfNeeded(new Runnable() {
@Override
public void run() {
jt.undo();
FormUndoState current = (FormUndoState) jt.getUndoState();
current.applyState();
}
});
}

Loading…
Cancel
Save