@ -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);
}
@ -584,9 +584,4 @@ public class SelectionModel {
selection.setSelectedCreators(rebuildSelection);
fireCreatorSelected();
public void fireCreatorDeleted() {
designer.getEditListenerTable().fireCreatorModified(selection.getSelectedCreator(),
DesignerEvent.CREATOR_DELETED);
@ -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() {
public void run() {
jt.undo();
FormUndoState current = (FormUndoState) jt.getUndoState();
current.applyState();
});