Navigation
API > API/Plugins > API/Plugins/ModelingComponents
References
| Module | ModelingComponents |
| Header | /Engine/Plugins/Runtime/MeshModelingToolset/Source/ModelingComponents/Public/TransactionUtil.h |
| Include | #include "TransactionUtil.h" |
Syntax
class FLongTransactionTracker
Remarks
A simple manager class to track transactions that will be open for a duration of time, e.g. during a mouse drag, within a single tool or mechanic. Provides some error checking to help catch cases where we open without closing or close without opening, or if we nest opening more transactions than expected. One way these can be used is to keep a transaction open during a mouse drag interaction as a way to prevent the user from undoing during the mouse drag. Otherwise, undoing during a mouse drag can cause bugs in many tools if they are not careful to undo any pending work in OnTerminateDragSequence.
Constructors
| Type | Name | Description | |
|---|---|---|---|
FLongTransactionTracker
(
int32 MaxOpen |
Destructors
| Type | Name | Description | |
|---|---|---|---|
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | Close
(
UInteractiveToolManager* ToolManager |
Close a single long transaction. Expect that at least one is open. | |
| void | CloseAll
(
UInteractiveToolManager* ToolManager |
Close any/all open transactions as part of shutdown of the owning tool/mechanic. Always safe to call on shutdown; OK if none are open. | |
| void | Open
(
FText TransactionName, |
Open a single long transaction. |