You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Change summary: - Moved base "managed list" customization out into its own class so that it can be shared with editor/project settings customization. - Refactored Blueprint global options (i.e. Class Settings) details customization to utilize the new "managed list" base class. - Removed filter text as a customizable managed list display option and redefined it to be more consistent with property editor nodes. - Fixed the "Imports" display in Class Settings to no longer list global imports in the non-default section. - Added a new details customization for UBlueprintEditorSettings. - Added a customized editor for the 'NamespacesToAlwaysInclude' property for both local user settings and shared project settings. - Moved the "Add" button for imports and interfaces to be on the same line as the header row (eliminates some wasted space in the details view). - Fixed up global import property display names and tooltips to be more descriptive. - Fixed an issue that prevented reselection of the previous namespace setting in the Blueprint namespace entry combo box after clearing it. - Fixed the incorrect vertical alignment of import/interface item rows. #jira UE-143552, UE-133369, UE-136904, UE-142557 #rb Ben.Hoffman #preflight 622ba26c46679d56c31dddda [CL 19365260 by Phillip Kavan in ue5-main branch]
49 lines
2.0 KiB
C++
49 lines
2.0 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "Settings/BlueprintEditorProjectSettings.h"
|
|
#include "Modules/ModuleManager.h"
|
|
#include "BlueprintEditorModule.h"
|
|
#include "Editor.h"
|
|
|
|
/* UBlueprintEditorProjectSettings */
|
|
|
|
UBlueprintEditorProjectSettings::UBlueprintEditorProjectSettings(const FObjectInitializer& ObjectInitializer)
|
|
: Super(ObjectInitializer)
|
|
, DefaultChildActorTreeViewMode(EChildActorComponentTreeViewVisualizationMode::ComponentOnly)
|
|
{
|
|
}
|
|
|
|
void UBlueprintEditorProjectSettings::PostEditChangeProperty(struct FPropertyChangedEvent& PropertyChangedEvent)
|
|
{
|
|
Super::PostEditChangeProperty(PropertyChangedEvent);
|
|
|
|
const FName Name = PropertyChangedEvent.Property ? PropertyChangedEvent.Property->GetFName() : NAME_None;
|
|
if (Name == GET_MEMBER_NAME_CHECKED(UBlueprintEditorProjectSettings, bEnableChildActorExpansionInTreeView))
|
|
{
|
|
// Find open blueprint editors and refresh them
|
|
FBlueprintEditorModule& BlueprintEditorModule = FModuleManager::LoadModuleChecked<FBlueprintEditorModule>("Kismet");
|
|
for (const TSharedRef<IBlueprintEditor>& BlueprintEditor : BlueprintEditorModule.GetBlueprintEditors())
|
|
{
|
|
BlueprintEditor->RefreshEditors();
|
|
}
|
|
|
|
// Deselect actors so we are forced to clear the current tree view
|
|
// @todo - Figure out how to update the tree view directly instead?
|
|
if (GEditor && GEditor->GetSelectedActorCount() > 0)
|
|
{
|
|
const bool bNoteSelectionChange = true;
|
|
const bool bDeselectBSPSurfaces = true;
|
|
GEditor->SelectNone(bNoteSelectionChange, bDeselectBSPSurfaces);
|
|
}
|
|
}
|
|
else if (Name == GET_MEMBER_NAME_CHECKED(UBlueprintEditorProjectSettings, NamespacesToAlwaysInclude))
|
|
{
|
|
// Close any open Blueprint editor windows so that we have a chance to reload them with the updated import set.
|
|
FBlueprintEditorModule& BlueprintEditorModule = FModuleManager::LoadModuleChecked<FBlueprintEditorModule>("Kismet");
|
|
for (const TSharedRef<IBlueprintEditor>& BlueprintEditor : BlueprintEditorModule.GetBlueprintEditors())
|
|
{
|
|
BlueprintEditor->CloseWindow();
|
|
}
|
|
}
|
|
}
|