As you can see, scroll bar immediately collapses after updating it’s length, and also i can not scroll the panel with mouse wheel either.
I spent almost 1 week to fix this, but i couldn’t handle it properly…
it will be so nice if you share a solution for this. Thank you
Full source code for detail panel:
class SSpineRigDataPropertiesTabBody : public SCompoundWidget
{
public:
SLATE_BEGIN_ARGS(SSpineRigDataPropertiesTabBody) {}
SLATE_ARGUMENT(TWeakPtr<FSpineRigDataEditorToolkit>, InParentToolkits)
SLATE_END_ARGS()
public:
TWeakPtr<class FSpineRigDataEditorToolkit> SpineRigDataEditorToolkitPtr;
TSharedPtr<class IDetailsView> PropertyView;
public:
void Construct(const FArguments& InArgs)
{
SpineRigDataEditorToolkitPtr = InArgs._InParentToolkits;
FDetailsViewArgs DetailsViewArgs(false, false, true, FDetailsViewArgs::HideNameArea, true);
DetailsViewArgs.bAllowSearch = false;
FPropertyEditorModule& PropertyEditorModule = FModuleManager::LoadModuleChecked<FPropertyEditorModule>("PropertyEditor");
PropertyView = PropertyEditorModule.CreateDetailView(DetailsViewArgs);
PropertyView->RegisterInstancedCustomPropertyLayout(USpineRigData::StaticClass(), FOnGetDetailCustomizationInstance::CreateStatic(&FSpineRigDataDetailsCustomization::MakeInstance));
PropertyView->SetObject(SpineRigDataEditorToolkitPtr.Pin()->GetEditingAsset());
ChildSlot
[
PropertyView.ToSharedRef()
];
}
//
void SetPropertyWindowContents(TArray<UObject*> Objects) {
if (FSlateApplication::IsInitialized())
{
check(PropertyView.IsValid());
PropertyView->SetObjects(Objects);
}
}
void UpdateShowingObject(TArray<UObject*> Objects) {
if (Objects.Num()) {
SetPropertyWindowContents(Objects);
}
else {
TArray<UObject*> Arr;
Arr.Add(SpineRigDataEditorToolkitPtr.Pin()->GetEditingAsset());
SetPropertyWindowContents(Arr);
}
}
};