Skip to content

Commit

Permalink
Fix no Files being linted
Browse files Browse the repository at this point in the history
  • Loading branch information
jwindgassen committed Nov 9, 2023
1 parent 80a20ce commit 49f6914
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions Source/Linter/Private/LinterContentBrowserExtensions.cpp
Original file line number Diff line number Diff line change
@@ -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"
Expand Down Expand Up @@ -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<UContentBrowserDataMenuContext_FolderMenu>()) {
TArray<FString> SelectedPaths;
for (const auto& Asset : Context->SelectedItems) {
SelectedPaths.Add(Asset.GetVirtualPath().ToString());
}

RunLinterForAssets(SelectedPaths);
if (const auto* Context = InContext.FindContext<UContentBrowserFolderContext>()) {
RunLinterForAssets(Context->SelectedPackagePaths);
}
})
);
Expand Down

0 comments on commit 49f6914

Please sign in to comment.