try{
// This "while" should roll multiple adds or deletes into one.
//System.out.println(undoStyle);
//System.out.println(undoMgr.getUndoPresentationName());
while(undoStyle.equals(undoMgr.getUndoPresentationName()))
undoMgr.undo();
}catch(CannotUndoException ex){
//JOptionPane.showMessageDialog(this, lang.getString("MSG_NOTHING_TO_UNDO"), "No change" , JOptionPane.INFORMATION_MESSAGE);
}
updateWindowTitle();
updateUndoRedoMenuState();