@Override
	public synchronized boolean endTransaction(int transactionID, boolean commit) {

		if (viewComposite != null && getTransactionCount() == 1) {
			// Perform orphan removal only at the end of the outer-most transaction
			synchronized (orphanIds) {
				checkOrphansForRemoval(false);
			}
		}

		boolean committed = super.endTransaction(transactionID, commit);

		if (!isTransactionActive() && flattenModCount != -1) {
			if (flattenModCount != dbHandle.getModCount()) {
				// Mod count differs from flagged mod count - clean undo/redo
				clearUndo();
			}
			flattenModCount = -1;
		}

		if (committed && dataTypeChanged && changeCallback != null) {
			Swing.runLater(() -> changeCallback.call());
		}

		if (getTransactionCount() == 0) {
			dataTypeChanged = false;
		}

		return committed;
	}
Refresh all datatypes which originate from the originalDTM.
This methods is intended for use following an undo/redo of the originalDTM only
and will purge the ID mappings for any datatypes which no longer exist or become
orphaned.
@return true if a dependency change is detected, else false
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/compositeeditor/CompositeViewerDataTypeManager.java