From 49f69144536ecf1e823ea0204b15001100cd1dd5 Mon Sep 17 00:00:00 2001 From: Jonathan Windgassen Date: Thu, 9 Nov 2023 12:00:46 +0100 Subject: [PATCH] Fix no Files being linted --- .../Linter/Private/LinterContentBrowserExtensions.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/Source/Linter/Private/LinterContentBrowserExtensions.cpp b/Source/Linter/Private/LinterContentBrowserExtensions.cpp index 50ed329..340846d 100644 --- a/Source/Linter/Private/LinterContentBrowserExtensions.cpp +++ b/Source/Linter/Private/LinterContentBrowserExtensions.cpp @@ -1,6 +1,7 @@ // Copyright 1998-2018 Epic Games, Inc. All Rights Reserved. #include "LinterContentBrowserExtensions.h" +#include "ContentBrowserMenuContexts.h" #include "LinterStyle.h" #include "ContentBrowserModule.h" #include "Linter.h" @@ -111,13 +112,8 @@ void FLinterContentBrowserExtensions::InstallHooks() { LOCTEXT("ScanWithLinter_Tooltip", "Scan project content with Linter"), FSlateIcon(FLinterStyle::GetStyleSetName(), "Linter.Toolbar.Icon"), FToolMenuExecuteAction::CreateLambda([](const FToolMenuContext& InContext) { - if (const UContentBrowserDataMenuContext_FolderMenu* Context = InContext.FindContext()) { - TArray SelectedPaths; - for (const auto& Asset : Context->SelectedItems) { - SelectedPaths.Add(Asset.GetVirtualPath().ToString()); - } - - RunLinterForAssets(SelectedPaths); + if (const auto* Context = InContext.FindContext()) { + RunLinterForAssets(Context->SelectedPackagePaths); } }) );