Skip to content

Commit

Permalink
fix: mvg and tgt groups active in fused
Browse files Browse the repository at this point in the history
* also avoids duplicating groups

see #183
  • Loading branch information
bogovicj committed Feb 11, 2025
1 parent 82a550f commit abad05e
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/main/java/bigwarp/BigWarp.java
Original file line number Diff line number Diff line change
Expand Up @@ -669,9 +669,8 @@ public boolean accept( final File f )
if( data.sources.size() > 0 )
initialize();

createMovingTargetGroups();
viewerP.state().setCurrentGroup( mvgGrp );
viewerQ.state().setCurrentGroup( tgtGrp );


// viewerQ.state().changeListeners().add(warpVisDialog.transformGraphPanel);

SwingUtilities.invokeLater( () -> {
Expand Down Expand Up @@ -832,10 +831,10 @@ public void initialize()

updateSourceBoundingBoxEstimators();

setAllSourcesActiveInFused();
createMovingTargetGroups();
viewerP.state().setCurrentGroup( mvgGrp );
viewerP.state().setCurrentGroup( tgtGrp );
viewerQ.state().setCurrentGroup( tgtGrp );
setAllSourcesAndGroupsActiveInFused();

// set initial transforms so data are visible
// SwingUtilities.invokeLater( () -> {
Expand Down Expand Up @@ -958,10 +957,15 @@ public void synchronizeSources()
/**
* Sets the viewer state so that every source is shown in vused mode
*/
protected void setAllSourcesActiveInFused() {
protected void setAllSourcesAndGroupsActiveInFused() {

viewerP.state().setSourcesActive(data.sources, true);
viewerP.state().setGroupActive(mvgGrp, true);
viewerP.state().setGroupActive(tgtGrp, true);

viewerQ.state().setSourcesActive(data.sources, true);
viewerQ.state().setGroupActive(mvgGrp, true);
viewerQ.state().setGroupActive(tgtGrp, true);
}

/**
Expand Down

0 comments on commit abad05e

Please sign in to comment.