+ static size_t aTransactionID = 0;
+ static size_t aNbTransactions = -1;
+ size_t aNbUndo = ModelAPI_Session::get()->undoList().size();
+ if (aNbUndo != aNbTransactions) {
+ // the last transaction was not empty, thus increase the ID
+ aNbTransactions = aNbUndo;
+ ++aTransactionID;
+ }