diff --git a/src/main/java/org/mastodon/views/bdv/overlay/EditSpecialBehaviours.java b/src/main/java/org/mastodon/views/bdv/overlay/EditSpecialBehaviours.java index 4ce0a4e0f..106a2471c 100644 --- a/src/main/java/org/mastodon/views/bdv/overlay/EditSpecialBehaviours.java +++ b/src/main/java/org/mastodon/views/bdv/overlay/EditSpecialBehaviours.java @@ -475,7 +475,7 @@ public void init( final int x, final int y ) // Create new vertex under click location. source.getCovariance( mat ); final int timepoint = viewer.state().getCurrentTimepoint(); - overlayGraph.addVertex( target ).init( timepoint, pos, mat ); + V vertex = overlayGraph.addVertex( target ).init( timepoint, pos, mat ); // Link it to source vertex. Careful for oriented edge. if ( forward ) @@ -489,6 +489,8 @@ public void init( final int x, final int y ) overlay.paintGhostLink = true; overlay.paintGhostVertex = true; overlayGraph.notifyGraphChanged(); + if ( FOCUS_EDITED_SPOT ) + focus.focusVertex( vertex ); lock.readLock().lock(); lock.writeLock().unlock();