Просмотр исходного кода

StructureHierarchyManager tweak

David Sehnal 5 лет назад
Родитель
Сommit
d03a442b6c
1 измененных файлов с 4 добавлено и 0 удалено
  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);
             newCurrent.push(ref);
         }
         }
 
 
+        if (newCurrent.length === 0 && hierarchy.trajectories[0]?.models) {
+            this.behaviors.currentModels.next(hierarchy.trajectories[0]?.models);
+        }
+
         this.behaviors.currentModels.next(newCurrent);
         this.behaviors.currentModels.next(newCurrent);
     }
     }