Navigation
API > API/Editor > API/Editor/CurveEditor
Saves the current selection state and on destruction compares it against the then current selection. If the selection has changed when the scope ends, then
- it appends an undo-able action to the curve editor transaction manager,
- conditionally reverts the change if you called FScopedTransaction::Cancel on the surrounding transaction,
- conditionally broadcasts FCurveEditorSelection::OnSelectionChanged if you set EScopedSelectionChangeFlags::SuppressOnSelectionChangedEvent.
You can safely use this within the scope of a FScopedTransaction. In that case, the command will be added as sub-transaction to the parent transaction.
The following is operations are supported:
- Combination with FScopedKeyChange (
- Nesting within FScopedTransaction; if the outer FScopedTransaction is cancelled, FScopedSelectionChange can detect this (
- Nested FScopedSelectionChange
| Name | FScopedSelectionChange |
| Type | class |
| Header File | /Engine/Source/Editor/CurveEditor/Public/Modification/Utils/ScopedSelectionChange.h |
| Include Path | #include "Modification/Utils/ScopedSelectionChange.h" |
Syntax
class FScopedSelectionChange : public UE::CurveEditor::FScopedChangeBase
Inheritance Hierarchy
- FNoncopyable → FScopedChangeBase → FScopedSelectionChange
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FScopedSelectionChange
(
TWeakPtr< FCurveEditor > InCurveEditor, |
Modification/Utils/ScopedSelectionChange.h | ||
FScopedSelectionChange
(
TWeakPtr< FCurveEditor > InCurveEditor, |
Modification/Utils/ScopedSelectionChange.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
~FScopedSelectionChange() |
Modification/Utils/ScopedSelectionChange.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| Flags | const EScopedSelectionChangeFlags | Flags that affect the behaviour of this change. | Modification/Utils/ScopedSelectionChange.h | |
| OriginalSelection | FCurveEditorSelection | The selection the editor had when the transaction was started. | Modification/Utils/ScopedSelectionChange.h | |
| SelectionChangedSuppressor | TOptional< FScopedSelectionChangeEventSuppression > | Suppresses FCurveEditorSelection::OnSelectionChanged until the scope ends. | Modification/Utils/ScopedSelectionChange.h |