Undo transactions
Posted: Tue Mar 19, 2019 12:47 pm
MFM wrote:
I'm not entirely clear on the use of these procedures, but I'm assume that they can be used to break what the undo system would otherwise see as a single transaction into multiple transactions. (e.g. if I have a macro that updates a polyline and then updates some text in the same operation, I could wrap each of those discreet pieces of code in a UndoStartTransaction/UndoEnd transaction block so that the undo logic would treat them as 2 separate operations) ?
I have not been able to find anything in DCAL for Delphi that looks equivalent to these procedures ... is there a D4D equivalent ?
PROCEDURE UndoStartTransaction; BUILTIN 634;
PROCEDURE UndoEndTransaction; BUILTIN 635;
These procedures mark the beginning and end of what the undo system sees as a "transaction".
For example, when creating a single line, the undo system sees the following:
- An entity was added
- It was drawn to the screen
- It was marked as the end of a "group"
These 3 steps are seen as a single "transaction" and will be "un-done" together.
I'm not entirely clear on the use of these procedures, but I'm assume that they can be used to break what the undo system would otherwise see as a single transaction into multiple transactions. (e.g. if I have a macro that updates a polyline and then updates some text in the same operation, I could wrap each of those discreet pieces of code in a UndoStartTransaction/UndoEnd transaction block so that the undo logic would treat them as 2 separate operations) ?
I have not been able to find anything in DCAL for Delphi that looks equivalent to these procedures ... is there a D4D equivalent ?