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