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