Explorar o código

StructureHierarchyManager tweak

David Sehnal %!s(int64=5) %!d(string=hai) anos
pai
achega
d03a442b6c
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      src/mol-plugin-state/manager/structure.ts

+ 4 - 0
src/mol-plugin-state/manager/structure.ts

@@ -34,6 +34,10 @@ export class StructureHierarchyManager {
             newCurrent.push(ref);
         }
 
+        if (newCurrent.length === 0 && hierarchy.trajectories[0]?.models) {
+            this.behaviors.currentModels.next(hierarchy.trajectories[0]?.models);
+        }
+
         this.behaviors.currentModels.next(newCurrent);
     }