mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-113175 Expanding nodes in Variables(Debug tools window) while debug application throws exception
This commit is contained in:
@@ -72,7 +72,6 @@ public class WideSelectionTreeUI extends BasicTreeUI {
|
||||
boolean handled = false;
|
||||
public void mousePressed(@NotNull final MouseEvent e) {
|
||||
handled = false;
|
||||
if (!(e.getSource() instanceof JTree)) return;
|
||||
if (!isSelected(e)) {
|
||||
handled = true;
|
||||
handle(e);
|
||||
@@ -81,7 +80,6 @@ public class WideSelectionTreeUI extends BasicTreeUI {
|
||||
|
||||
@Override
|
||||
public void mouseReleased(@NotNull final MouseEvent e) {
|
||||
if (!(e.getSource() instanceof JTree)) return;
|
||||
if (!handled) {
|
||||
handle(e);
|
||||
}
|
||||
@@ -90,9 +88,12 @@ public class WideSelectionTreeUI extends BasicTreeUI {
|
||||
private boolean isSelected(MouseEvent e) {
|
||||
final JTree tree = (JTree)e.getSource();
|
||||
final int selected = tree.getClosestRowForLocation(e.getX(), e.getY());
|
||||
for (int row : tree.getSelectionRows()) {
|
||||
if (row == selected) {
|
||||
return true;
|
||||
final int[] rows = tree.getSelectionRows();
|
||||
if (rows != null) {
|
||||
for (int row : rows) {
|
||||
if (row == selected) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user