FreeCAD: master df4a8eb7

Author Committer Branch Timestamp Parent
abdullah wwmayer master 2020-06-13 05:24:43 master c6c549cc
Changeset Document/DocumentObject: onUndoRedoFinished()

=============================================

New mechanism for on-demand signaling of undo/redo transaction finalisation.

The mechanism consists of:
1) A status bit that is set, when an object should receive this signaling (e.g. because changes during transaction have been inhibited)
2) The new function to be called by the Document undo/redo actions when the transaction is over (for those objects having the status bit set).

Note 1: The undo/redo signals are now outside the undoing FlagToggler, this means that:
1) a call to isPerformingTransaction will return false.
2) a recompute the slot of such a signal will not be inhibited.

Note 2: The undo/redo signals are called once the documentobjects that requested to be notified after the trasaction is over have been notified.
The consequence is that the viewprovider can rely on the documentobject having a correct status.

I think that the behaviour of Note and Note 2 is the wanted behaviour of this signals, I cannot rule out that other parts of FC rely on the old
implementation.
mod - src/App/Document.cpp Diff File
mod - src/App/DocumentObject.cpp Diff File
mod - src/App/DocumentObject.h Diff File