Component type gets selected while expanding folders in component tree

This commit is contained in:
bancika
2017-01-17 18:08:29 +01:00
parent 44797477ba
commit fc36f9d632
2 changed files with 6 additions and 0 deletions
@@ -274,6 +274,8 @@ public class TreePanel extends JPanel {
@Override
public void mouseClicked(MouseEvent e) {
if (e.getClickCount() != 1)
return;
TreePath path = tree.getClosestPathForLocation(e.getX(), e.getY());
DefaultMutableTreeNode node = (DefaultMutableTreeNode) path.getLastPathComponent();
if (node != null && node.getUserObject() != null) {