Skip to content

Commit

Permalink
Merge pull request #128 from dmeybohm/fix-create-view-icon
Browse files Browse the repository at this point in the history
Fix create icon to show when there are no targets
  • Loading branch information
dmeybohm authored May 27, 2024
2 parents 1316f62 + 48a3c86 commit 4e1e857
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@ class NavigateToViewPopupHandler(

if (e.mouseButton == MouseButton.Left) {
val project = elt?.project ?: return
if (e.isControlDown) {
val hasTargets = !validTargets.isEmpty()
if (e.isControlDown || !hasTargets) {
val popup = JBPopupFactory.getInstance()
.createActionGroupPopup(
"Create View File",
Expand All @@ -99,7 +100,7 @@ class NavigateToViewPopupHandler(
true,
)
popup.show(point)
} else if (!validTargets.isEmpty()) {
} else if (hasTargets) {
navigateToDestination(project, validTargets, point)
}
}
Expand Down

0 comments on commit 4e1e857

Please sign in to comment.