Skip to content

Commit 49f6914

Browse files
committed
Fix no Files being linted
1 parent 80a20ce commit 49f6914

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

Source/Linter/Private/LinterContentBrowserExtensions.cpp

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Copyright 1998-2018 Epic Games, Inc. All Rights Reserved.
22

33
#include "LinterContentBrowserExtensions.h"
4+
#include "ContentBrowserMenuContexts.h"
45
#include "LinterStyle.h"
56
#include "ContentBrowserModule.h"
67
#include "Linter.h"
@@ -111,13 +112,8 @@ void FLinterContentBrowserExtensions::InstallHooks() {
111112
LOCTEXT("ScanWithLinter_Tooltip", "Scan project content with Linter"),
112113
FSlateIcon(FLinterStyle::GetStyleSetName(), "Linter.Toolbar.Icon"),
113114
FToolMenuExecuteAction::CreateLambda([](const FToolMenuContext& InContext) {
114-
if (const UContentBrowserDataMenuContext_FolderMenu* Context = InContext.FindContext<UContentBrowserDataMenuContext_FolderMenu>()) {
115-
TArray<FString> SelectedPaths;
116-
for (const auto& Asset : Context->SelectedItems) {
117-
SelectedPaths.Add(Asset.GetVirtualPath().ToString());
118-
}
119-
120-
RunLinterForAssets(SelectedPaths);
115+
if (const auto* Context = InContext.FindContext<UContentBrowserFolderContext>()) {
116+
RunLinterForAssets(Context->SelectedPackagePaths);
121117
}
122118
})
123119
);

0 commit comments

Comments
 (0)