Files
UnrealEngine/Engine/Source/Editor/CurveEditor/Private/Selection/ScopedSelectionChangeEventSuppression.cpp
Brandyn / Techy fcc1b09210 init
2026-04-04 15:40:51 -05:00

24 lines
723 B
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#include "Selection/ScopedSelectionChangeEventSuppression.h"
#include "CurveEditor.h"
#include "CurveEditorSelectionPrivate.h"
namespace UE::CurveEditor
{
FScopedSelectionChangeEventSuppression::FScopedSelectionChangeEventSuppression(const TSharedRef<FCurveEditor>& InCurveEditor)
: WeakCurveEditor(InCurveEditor)
{
KeySelection::FIncrementOnSelectionChangedSuppressionCount(InCurveEditor->Selection);
}
FScopedSelectionChangeEventSuppression::~FScopedSelectionChangeEventSuppression()
{
if (const TSharedPtr<FCurveEditor> CurveEditorPin = WeakCurveEditor.Pin())
{
KeySelection::FDecrementOnSelectionChangedSuppressionCount(CurveEditorPin->Selection);
}
}
}