Browse Source

focus manager: only union loci when from same structure

Alexander Rose 4 years ago
parent
commit
49c8c7f396
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/mol-plugin-state/manager/structure/focus.ts

+ 1 - 1
src/mol-plugin-state/manager/structure/focus.ts

@@ -93,7 +93,7 @@ export class StructureFocusManager extends StatefulPluginComponent<StructureFocu
     }
 
     addFromLoci(anyLoci: Loci) {
-        const union = this.state.current && StructureElement.Loci.is(anyLoci)
+        const union = this.state.current && StructureElement.Loci.is(anyLoci) && anyLoci.structure === this.state.current.loci.structure
             ? StructureElement.Loci.union(anyLoci, this.state.current.loci)
             : anyLoci;
         this.setFromLoci(union);