Files
UnrealEngineUWP/Engine/Source/Developer/TranslationEditor/Private/TranslationUnit.cpp
mark meijer 94e1b9d72d Move TranslationPicker from Editor to Developer, to run in game
#rb Jamie.Dale

[CL 34950482 by mark meijer in ue5-main branch]
2024-07-19 19:18:48 -04:00

31 lines
865 B
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#include "TranslationUnit.h"
#include "Misc/AssertionMacros.h"
#include "UObject/NameTypes.h"
#include "UObject/UnrealNames.h"
#include "UObject/UnrealType.h"
UTranslationUnit::UTranslationUnit( const FObjectInitializer& ObjectInitializer )
: Super(ObjectInitializer)
{
}
#if WITH_EDITOR
void UTranslationUnit::PostEditChangeProperty(struct FPropertyChangedEvent& PropertyChangedEvent)
{
Super::PostEditChangeProperty(PropertyChangedEvent);
const FName Name = (PropertyChangedEvent.Property != nullptr) ? PropertyChangedEvent.Property->GetFName() : NAME_None;
if (Name == GET_MEMBER_NAME_CHECKED(UTranslationUnit, Translation))
{
// Consider modifying the translation to be an implicit review
HasBeenReviewed = true;
}
TranslationUnitPropertyChangedEvent.Broadcast(Name);
}
#endif // WITH_EDITOR