Files
UnrealEngineUWP/Engine/Source/Editor/PropertyEditor/Public/PropertyEditorDelegates.cpp
sebastian nordgren 3503111230 Added missing TEXT() macro.
[CL 16184003 by sebastian nordgren in ue5-main branch]
2021-05-03 10:41:25 -04:00

23 lines
763 B
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#include "PropertyEditorDelegates.h"
#include "PropertyHandle.h"
FPropertyAndParent::FPropertyAndParent(const TSharedRef<IPropertyHandle>& InPropertyHandle, const TArray<TWeakObjectPtr<UObject>>& InObjects) :
Property(*InPropertyHandle->GetProperty()),
Objects(InObjects)
{
checkf(InPropertyHandle->GetProperty() != nullptr, TEXT("Creating an FPropertyAndParent with a null property!"));
TSharedPtr<IPropertyHandle> ParentHandle = InPropertyHandle->GetParentHandle();
while (ParentHandle.IsValid())
{
const FProperty* ParentProperty = ParentHandle->GetProperty();
if (ParentProperty != nullptr)
{
ParentProperties.Add(ParentProperty);
}
ParentHandle = ParentHandle->GetParentHandle();
}
}