Skip to content

Commit

Permalink
Focus the created Spot of AddSpotAndLinkIt behaviour already directly…
Browse files Browse the repository at this point in the history
… after it has been

* The reasoning behind this change is that the OverlayGraphRenderer would recognize the newly created spot as existing, but yet invisible because the TrackOfFocusedVisibility would tell so, but this is actually not true.
  • Loading branch information
stefanhahmann authored and tinevez committed May 16, 2024
1 parent 815718f commit 8328196
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
Expand All @@ -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();
Expand Down

0 comments on commit 8328196

Please sign in to comment.