MCPcopy Create free account
hub / github.com/FreeCAD/FreeCAD / commitTransaction

Method commitTransaction

src/App/Document.cpp:566–586  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

564}
565
566void Document::commitTransaction() // NOLINT
567{
568 if (isPerformingTransaction() || d->committing) {
569 if (FC_LOG_INSTANCE.isEnabled(FC_LOGLEVEL_LOG)) {
570 FC_WARN("Cannot commit transaction while transacting");
571 }
572 return;
573 }
574
575 if (d->activeUndoTransaction) {
576 // This will iterate over all documents and ask them to
577 // commit their transaction if their ID matches
578 GetApplication().commitTransaction(d->activeUndoTransaction->getID());
579 } else {
580 const bool wasRecoveryWriteBlocked = transactionStateBlocksRecoveryWrite(*d);
581 d->bookedTransaction = 0; // Reset booked transaction even if it was not used
582 if (wasRecoveryWriteBlocked) {
583 signalBecameStable(*this);
584 }
585 }
586}
587
588bool Document::_commitTransaction(const bool notify)
589{

Callers 15

_commitTransactionMethod · 0.45
setValueMethod · 0.45
dropInDocumentMethod · 0.45
dropInObjectMethod · 0.45
setDataMethod · 0.45
setExpressionMethod · 0.45
applyMethod · 0.45
insertFromMimeDataMethod · 0.45
commitCommandMethod · 0.45
_resetEditMethod · 0.45
commitCommandMethod · 0.45
setupContextMenuMethod · 0.45

Calls 3

isEnabledMethod · 0.45
getIDMethod · 0.45

Tested by 6

testMakeTopoShapeListMethod · 0.36
testPartBodyMethod · 0.36
testIssue17553Method · 0.36
testDependencyMethod · 0.36