Browse Source

show error when no entry for streaming is found

Alexander Rose 5 years ago
parent
commit
975b4aee2a
1 changed files with 3 additions and 1 deletions
  1. 3 1
      src/mol-plugin-ui/structure/volume.tsx

+ 3 - 1
src/mol-plugin-ui/structure/volume.tsx

@@ -70,7 +70,9 @@ export class VolumeStreamingControls extends CollapsableControls<{}, VolumeStrea
 
         const simpleApply = rootCell && rootCell.status === 'error'
             ? { header: 'Error enabling', icon: 'alert' as const, title: rootCell.errorText }
-            : { header: 'Enable', icon: 'check' as const, title: 'Enable' }
+            : rootCell && rootCell.obj?.data.entries.length === 0
+                ? { header: 'Error enabling', icon: 'alert' as const, title: 'No entry for streaming found' }
+                : { header: 'Enable', icon: 'check' as const, title: 'Enable' }
 
         return <ApplyActionControl state={pivot.cell.parent} action={InitVolumeStreaming} initiallyCollapsed={true} nodeRef={pivot.cell.transform.ref} simpleApply={simpleApply} />;
     }