diff options
author | Thomas White <taw@physics.org> | 2020-07-03 10:30:20 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2020-07-29 18:53:45 +0200 |
commit | c68488f1f82883ab025093cdcc6af4d43ce43cd5 (patch) | |
tree | 396e743c9cc52e55e6ee4c2b1aee24f34d8a8a7b | |
parent | 74df4e977320a454d65f41b1cc000fdbbbd3485e (diff) |
Special cases for stream
-rw-r--r-- | src/crystfel_gui.c | 13 | ||||
-rw-r--r-- | src/gui_project.c | 14 |
2 files changed, 17 insertions, 10 deletions
diff --git a/src/crystfel_gui.c b/src/crystfel_gui.c index ee4d2203..18c70b3f 100644 --- a/src/crystfel_gui.c +++ b/src/crystfel_gui.c @@ -863,11 +863,16 @@ int main(int argc, char *argv[]) DataTemplate *dtempl; GtkAction *w; proj.cur_frame = 0; - dtempl = data_template_new_from_file(proj.geom_filename); - if ( dtempl != NULL ) { - crystfel_image_view_set_datatemplate(CRYSTFEL_IMAGE_VIEW(proj.imageview), - dtempl); + + if ( proj.geom_filename != NULL ) { + dtempl = data_template_new_from_file(proj.geom_filename); + if ( dtempl != NULL ) { + crystfel_image_view_set_datatemplate(CRYSTFEL_IMAGE_VIEW(proj.imageview), + dtempl); + proj.dtempl = dtempl; + } } + w = gtk_ui_manager_get_action(proj.ui, "/mainwindow/view/peaks"); gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(w), proj.show_peaks); diff --git a/src/gui_project.c b/src/gui_project.c index 280cc1be..22458daa 100644 --- a/src/gui_project.c +++ b/src/gui_project.c @@ -383,12 +383,14 @@ int save_project(struct crystfelproject *proj) fprintf(fh, "backend %s\n", proj->backend->name); fprintf(fh, "-----\n"); - for ( i=0; i<proj->n_frames; i++ ) { - if ( proj->events[i] != NULL ) { - fprintf(fh, "%s %s\n", - proj->filenames[i], proj->events[i]); - } else { - fprintf(fh, "%s\n", proj->filenames[i]); + if ( proj->stream == NULL ) { + for ( i=0; i<proj->n_frames; i++ ) { + if ( proj->events[i] != NULL ) { + fprintf(fh, "%s %s\n", + proj->filenames[i], proj->events[i]); + } else { + fprintf(fh, "%s\n", proj->filenames[i]); + } } } |