if (answer != 1)
return;
Main.pref.put("purge.clear_undo_redo", cbClearUndoRedo.isSelected());
Main.main.undoRedo.add(new PurgeCommand(Main.main.getEditLayer(), toPurgeChecked, makeIncomplete));
if (cbClearUndoRedo.isSelected()) {
Main.main.undoRedo.clean();
getCurrentDataSet().clearSelectionHistory();
}