void SDetailsViewBase::UpdatePropertyMap() { // Reset everything ClassToPropertyMap.Empty(); ClassesWithProperties.Empty(); // We need to be able to create a new detail layout and properly clean up the old one in the process check(!DetailLayout.IsValid() || DetailLayout.IsUnique()); RootTreeNodes.Empty(); DetailLayout = MakeShareable(new FDetailLayoutBuilderImpl(ClassToPropertyMap, PropertyUtilities.ToSharedRef(), SharedThis(this))); auto RootPropertyNode = GetRootNode(); check(RootPropertyNode.IsValid()); // Currently object property nodes do not provide any useful information other than being a container for its children. We do not draw anything for them. // When we encounter object property nodes, add their children instead of adding them to the tree. UpdatePropertyMapRecursive(*RootPropertyNode, *DetailLayout, NAME_None, RootPropertyNode.Get()); CustomUpdatePropertyMap(); // Ask for custom detail layouts, unless disabled. One reason for disabling custom layouts is that the custom layouts // inhibit our ability to find a single property's tree node. This is problematic for the diff and merge tools, that need // to display and highlight each changed property for the user. We could whitelist 'good' customizations here if // we can make them work with the diff/merge tools. if( !bDisableCustomDetailLayouts ) { QueryCustomDetailLayout(*DetailLayout); } DetailLayout->GenerateDetailLayout(); UpdateFilteredDetails(); }
void SDetailsViewBase::UpdateSinglePropertyMap(TSharedPtr<FComplexPropertyNode>& InRootPropertyNode, FDetailLayoutData& LayoutData) { // Reset everything LayoutData.ClassToPropertyMap.Empty(); TSharedPtr<FDetailLayoutBuilderImpl> DetailLayout = MakeShareable(new FDetailLayoutBuilderImpl(InRootPropertyNode, LayoutData.ClassToPropertyMap, PropertyUtilities.ToSharedRef(), SharedThis(this))); LayoutData.DetailLayout = DetailLayout; TSharedPtr<FComplexPropertyNode> RootPropertyNode = InRootPropertyNode; check(RootPropertyNode.IsValid()); bool const bEnableFavoriteSystem = GIsRequestingExit ? false : (GetDefault<UEditorExperimentalSettings>()->bEnableFavoriteSystem && DetailsViewArgs.bAllowFavoriteSystem); // Currently object property nodes do not provide any useful information other than being a container for its children. We do not draw anything for them. // When we encounter object property nodes, add their children instead of adding them to the tree. UpdateSinglePropertyMapRecursive(*RootPropertyNode, LayoutData, NAME_None, RootPropertyNode.Get(), bEnableFavoriteSystem, false); CustomUpdatePropertyMap(LayoutData.DetailLayout); // Ask for custom detail layouts, unless disabled. One reason for disabling custom layouts is that the custom layouts // inhibit our ability to find a single property's tree node. This is problematic for the diff and merge tools, that need // to display and highlight each changed property for the user. We could whitelist 'good' customizations here if // we can make them work with the diff/merge tools. if(!bDisableCustomDetailLayouts) { QueryCustomDetailLayout(LayoutData); } LayoutData.DetailLayout->GenerateDetailLayout(); }