Browse Source

zenode import fixes

Alexander Rose 3 years ago
parent
commit
efffca0026
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/extensions/zenodo/ui.tsx

+ 2 - 2
src/extensions/zenodo/ui.tsx

@@ -99,7 +99,7 @@ function createImportParams(files: ZenodoFile[], plugin: PluginContext) {
         params.structure = PD.Select(modelOpts[0][0], modelOpts);
     }
 
-    if (modelOpts.length && topologyOpts.length) {
+    if (topologyOpts.length && coordinatesOpts.length) {
         if (!defaultType) defaultType = 'trajectory';
         params.trajectory = PD.Group({
             topology: PD.Select(topologyOpts[0][0], topologyOpts),
@@ -249,7 +249,7 @@ export class ZenodoImportUI extends CollapsableControls<{}, State> {
     private renderLoadRecord() {
         return <div style={{ marginBottom: 10 }}>
             <ParameterControls params={ZenodoImportParams} values={this.state.recordValues} onChangeValues={this.recordParamsOnChange} isDisabled={this.state.busy} />
-            <Button onClick={this.loadRecord} style={{ marginTop: 1 }} disabled={this.state.busy}>
+            <Button onClick={this.loadRecord} style={{ marginTop: 1 }} disabled={this.state.busy || !this.state.recordValues.record}>
                 Load Record
             </Button>
         </div>;