Files
UnrealEngineUWP/Engine/Source/Runtime/Landscape/Private/LandscapeSettings.cpp
jonathan bard 92b8fdb0a5 Turned landscape brush size's max slider and max clamp value into project settings
Misc:
* Removed FLandscapeEditorServices, which didn't make much sense in terms of design wrt dependency inversion : instead, FLanscapeEditorModule is the one implementing ILandscapeEditorServices

#jira UE-195737
#tests editor
#rb don.boogert

[CL 28079921 by jonathan bard in ue5-main branch]
2023-09-21 05:17:01 -04:00

25 lines
948 B
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#include "LandscapeSettings.h"
#include "LandscapeModule.h"
#include "Modules/ModuleManager.h"
#include "LandscapeEditorServices.h"
#if WITH_EDITOR
void ULandscapeSettings::PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent)
{
Super::PostEditChangeProperty(PropertyChangedEvent);
const FName PropertyName = PropertyChangedEvent.MemberProperty ? PropertyChangedEvent.MemberProperty->GetFName() : NAME_None;
if ((PropertyName == GET_MEMBER_NAME_CHECKED(ULandscapeSettings, BrushSizeUIMax))
|| (PropertyName == GET_MEMBER_NAME_CHECKED(ULandscapeSettings, BrushSizeClampMax)))
{
// If landscape mode is active, refresh the detail panel to apply the changes immediately :
ILandscapeModule& LandscapeModule = FModuleManager::GetModuleChecked<ILandscapeModule>("Landscape");
LandscapeModule.GetLandscapeEditorServices()->RefreshDetailPanel();
}
}
#endif // WITH_EDITOR