Fix global search

This commit is contained in:
SuspiciousActivity committed 2021-04-20 20:59:16 +02:00
1 parent 74e9491fcf
commit 46c0596768
1 file changed
+4 -6
@@ -37,12 +37,10 @@ public class GlobalSearchOpenBox extends JFrame {
JList<Info> list = new JList(model); JList<Info> list = new JList(model);
list.addListSelectionListener(new ListSelectionListener() { list.addListSelectionListener(new ListSelectionListener() {
public void valueChanged(ListSelectionEvent e) { public void valueChanged(ListSelectionEvent e) {
SingleThreadedExecutor.submit(() -> { Info val = list.getSelectedValue();
Info val = list.getSelectedValue(); if (!e.getValueIsAdjusting() && val != null && !val.owner.equals(Main.currentNodeName)) {
if (val != null && !val.owner.equals(Main.currentNodeName)) { SingleThreadedExecutor.submit(() -> Main.selectFile(val.owner + ".class"));
Main.selectFile(val.owner); }
}
});
} }
}); });