kopia lustrzana https://github.com/JOSM/MapWithAI
Really fix deadlock(tm) (try running some items through EDT, since that is where deadlock happens)
Signed-off-by: Taylor Smock <taylor.smock@kaart.com>pull/1/head v1.3.1
rodzic
a589db8cfa
commit
e9be8a7fc9
|
@ -60,8 +60,18 @@ public class CreateConnectionsCommand extends Command {
|
|||
command.executeCommand();
|
||||
}
|
||||
if (undoCommands != null) {
|
||||
undoCommands.executeCommand();
|
||||
SwingUtilities.invokeLater(() -> UndoRedoHandler.getInstance().add(undoCommands, false));
|
||||
try {
|
||||
SwingUtilities.invokeAndWait(() -> undoCommands.executeCommand());
|
||||
} catch (InvocationTargetException e) {
|
||||
undoCommands.executeCommand();
|
||||
Logging.debug(e);
|
||||
} catch (InterruptedException e) {
|
||||
undoCommands.executeCommand();
|
||||
Logging.debug(e);
|
||||
Thread.currentThread().interrupt();
|
||||
} finally {
|
||||
SwingUtilities.invokeLater(() -> UndoRedoHandler.getInstance().add(undoCommands, false));
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue