This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

View | Details | Raw Unified | Return to bug 228450
Collapse All | Expand All

(-)a/openide.explorer/src/org/openide/explorer/view/TreeView.java (-1 / +5 lines)
Lines 1611-1617 Link Here
1611
        public void mouseClicked(MouseEvent e) {
1611
        public void mouseClicked(MouseEvent e) {
1612
            tree.stopEditing();
1612
            tree.stopEditing();
1613
            int selRow = tree.getRowForLocation(e.getX(), e.getY());
1613
            int selRow = tree.getRowForLocation(e.getX(), e.getY());
1614
1615
            if ((selRow != -1) && SwingUtilities.isLeftMouseButton(e) && MouseUtils.isDoubleClick(e)) {
1614
            if ((selRow != -1) && SwingUtilities.isLeftMouseButton(e) && MouseUtils.isDoubleClick(e)) {
1616
                // Default action.
1615
                // Default action.
1617
                if (defaultActionEnabled) {
1616
                if (defaultActionEnabled) {
Lines 1638-1643 Link Here
1638
                } else {
1637
                } else {
1639
                    tree.expandRow(selRow);
1638
                    tree.expandRow(selRow);
1640
                }
1639
                }
1640
            } else if (selRow == -1 && SwingUtilities.isLeftMouseButton(e)) {
1641
                int row = e.getY() / tree.getRowHeight();
1642
                if (row < tree.getRowCount()) {
1643
                    tree.setSelectionRow(row);
1644
                }
1641
            }
1645
            }
1642
        }
1646
        }
1643
1647

Return to bug 228450