Skip to content

Commit

Permalink
Merge pull request #491 from dozmus/features/fix-open-file-empty-space
Browse files Browse the repository at this point in the history
fix clicking on empty space in row not opening file
  • Loading branch information
Konloch committed Apr 9, 2024
2 parents c2f516a + 48adf04 commit 2a9fafd
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -484,8 +484,8 @@ public void mouseReleased(MouseEvent e)
this.tree.addMouseListener(new MouseAdapter() {
@Override
public void mousePressed(MouseEvent e) {
if(e.getButton() == MouseEvent.BUTTON1) //right-click
openPath(tree.getPathForLocation(e.getX(), e.getY()));
if (e.getButton() == MouseEvent.BUTTON1) // left-click
openPath(tree.getClosestPathForLocation(e.getX(), e.getY()));
}
});

Expand Down

0 comments on commit 2a9fafd

Please sign in to comment.