Skip to content

Commit abad05e

Browse files
committed
fix: mvg and tgt groups active in fused
* also avoids duplicating groups see #183
1 parent 82a550f commit abad05e

1 file changed

Lines changed: 10 additions & 6 deletions

File tree

src/main/java/bigwarp/BigWarp.java

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -669,9 +669,8 @@ public boolean accept( final File f )
669669
if( data.sources.size() > 0 )
670670
initialize();
671671

672-
createMovingTargetGroups();
673-
viewerP.state().setCurrentGroup( mvgGrp );
674-
viewerQ.state().setCurrentGroup( tgtGrp );
672+
673+
675674
// viewerQ.state().changeListeners().add(warpVisDialog.transformGraphPanel);
676675

677676
SwingUtilities.invokeLater( () -> {
@@ -832,10 +831,10 @@ public void initialize()
832831

833832
updateSourceBoundingBoxEstimators();
834833

835-
setAllSourcesActiveInFused();
836834
createMovingTargetGroups();
837835
viewerP.state().setCurrentGroup( mvgGrp );
838-
viewerP.state().setCurrentGroup( tgtGrp );
836+
viewerQ.state().setCurrentGroup( tgtGrp );
837+
setAllSourcesAndGroupsActiveInFused();
839838

840839
// set initial transforms so data are visible
841840
// SwingUtilities.invokeLater( () -> {
@@ -958,10 +957,15 @@ public void synchronizeSources()
958957
/**
959958
* Sets the viewer state so that every source is shown in vused mode
960959
*/
961-
protected void setAllSourcesActiveInFused() {
960+
protected void setAllSourcesAndGroupsActiveInFused() {
962961

963962
viewerP.state().setSourcesActive(data.sources, true);
963+
viewerP.state().setGroupActive(mvgGrp, true);
964+
viewerP.state().setGroupActive(tgtGrp, true);
965+
964966
viewerQ.state().setSourcesActive(data.sources, true);
967+
viewerQ.state().setGroupActive(mvgGrp, true);
968+
viewerQ.state().setGroupActive(tgtGrp, true);
965969
}
966970

967971
/**

0 commit comments

Comments
 (0)