Skip to content

Commit

Permalink
Fixes #3404 by using 'invokeLater' rather than 'invokeAndWait' in AWT
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexisDrogoul committed May 8, 2022
1 parent 96d937f commit 8c36231
Showing 1 changed file with 7 additions and 5 deletions.
Expand Up @@ -761,11 +761,13 @@ public void selectAgentsAroundMouse() {
final int yc = mousey - origin.y;
final List<ILayer> layers = layerManager.getLayersIntersecting(xc, yc);
if (layers.isEmpty()) return;
try {
EventQueue.invokeAndWait(() -> menuManager.buildMenu(mousex, mousey, xc, yc, layers));
} catch (InvocationTargetException | InterruptedException e) {
e.printStackTrace();
}
EventQueue.invokeLater(() -> menuManager.buildMenu(mousex, mousey, xc, yc, layers));
// Modified for Issue #3404 -- now calls the menu asynchronously
// try {
// EventQueue.invokeAndWait(() -> menuManager.buildMenu(mousex, mousey, xc, yc, layers));
// } catch (InvocationTargetException | InterruptedException e) {
// e.printStackTrace();
// }
}

@Override
Expand Down

0 comments on commit 8c36231

Please sign in to comment.