@Override
	void doUndo(boolean notify) throws IOException {
		if (canUndo()) {
			DomainObjectDBTransaction t = undoList.removeLast();
			t.initAfterState(domainObj);
			domainObj.dbh.undo();
			if (domainObj.changeSet != null) {
				domainObj.changeSet.undo();
			}
			redoList.addLast(t);
			domainObj.domainObjectRestored();
			t.restoreToolStates(true);
			if (notify) {
				notifyUndoRedo();
			}
		}
	}
Returns the undo stack depth (The number of items on the undo stack).

<p>
This method is for JUnits.

@return the undo stack depth
Ghidra/Framework/Project/src/main/java/ghidra/framework/data/DomainObjectTransactionManager.java