File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
ui/src/main/java/edu/wpi/grip/ui/pipeline Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -179,6 +179,10 @@ private ConnectionView findConnectionView(Connection connection) {
179179 * details of adding the connection.
180180 */
181181 private void addConnectionView (Connection connection ) {
182+ // runAndWait() is used here because we don't want the main thread to resume, possibly causing more actions
183+ // that manipulate the list of connections, until the GUI component is added. This prevents rendering issues.
184+ // Since the code in here JUST manipulates JavaFX components and doesn't post stuff to the EventBus, it's safe
185+ // to put in runAndWait() without fear of deadlock.
182186 PlatformImpl .runAndWait (() -> {
183187 // Before adding a connection control, we have to look up the controls for both sockets in the connection so
184188 // we know where to position it.
You can’t perform that action at this time.
0 commit comments