EA-102961 fixed

This commit is contained in:
Kirill Kirichenko
2017-08-01 18:03:25 +03:00
parent 906fd58417
commit f1f5aae2b7
@@ -135,9 +135,11 @@ public class CheckBoxList<T> extends JBList<JCheckBox> {
private void setPressed(MouseEvent e, boolean pressed) {
Point point = e.getPoint();
int index = locationToIndex(point);
JCheckBox cb = getModel().getElementAt(index);
cb.getModel().setPressed(pressed);
UIUtil.repaintViewport(CheckBoxList.this);
if (index >= 0 && index < getModel().getSize()) {
JCheckBox cb = getModel().getElementAt(index);
cb.getModel().setPressed(pressed);
UIUtil.repaintViewport(CheckBoxList.this);
}
}
});
}