use of com.revolsys.swing.undo.DeleteLayerRecordUndo in project com.revolsys.open by revolsys.
the class MergeRecordsDialog method finish.
public void finish() {
final MultipleUndo multipleUndo = new MultipleUndo();
for (final Record mergedRecord : this.mergedRecords.keySet()) {
final CreateRecordUndo createRecordUndo = new CreateRecordUndo(this.layer, mergedRecord);
multipleUndo.addEdit(createRecordUndo);
}
for (final LayerRecord record : this.replacedOriginalRecords) {
final DeleteLayerRecordUndo deleteRecordUndo = new DeleteLayerRecordUndo(record);
multipleUndo.addEdit(deleteRecordUndo);
}
if (this.undoManager == null) {
multipleUndo.redo();
} else {
this.undoManager.addEdit(multipleUndo);
}
setVisible(false);
}
Aggregations