IDEA-106145 Maven Artifact Search dialog: clicks on "plus"/"joint" tree element are processed as Add +review CR-IC

This commit is contained in:
Sergey Evdokimov
2013-04-24 22:07:04 +04:00
parent ee382a06f1
commit 69291499bd
@@ -123,11 +123,14 @@ public class MavenArtifactSearchPanel extends JPanel {
new DoubleClickListener() {
@Override
protected boolean onDoubleClick(MouseEvent event) {
Object sel = myResultList.getLastSelectedPathComponent();
if (sel != null && myResultList.getModel().isLeaf(sel)) {
myListener.itemSelected();
return true;
protected boolean onDoubleClick(MouseEvent e) {
final TreePath path = myResultList.getPathForLocation(e.getX(), e.getY());
if (path != null && myResultList.isPathSelected(path)) {
Object sel = path.getLastPathComponent();
if (sel != null && myResultList.getModel().isLeaf(sel)) {
myListener.itemSelected();
return true;
}
}
return false;
}