aboutsummaryrefslogtreecommitdiff
path: root/src/gui_project.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2021-12-02 15:48:52 +0100
committerThomas White <taw@physics.org>2021-12-02 16:19:39 +0100
commit681fbbe63fc58fe0783310f840f7de390470b351 (patch)
treeaf47f01acf05dbf22078fc778c391445b5090308 /src/gui_project.c
parent70bf4744ce51d52f439dcb6a652cad7c6daab466 (diff)
GUI: Add a checkbox for automatically rescanning streams
Usually, one will want this option enabled. However, sometimes it speeds things up a lot to disable it. Fixes: https://gitlab.desy.de/thomas.white/crystfel/-/issues/54
Diffstat (limited to 'src/gui_project.c')
-rw-r--r--src/gui_project.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gui_project.c b/src/gui_project.c
index 42c28df4..16b8b8fc 100644
--- a/src/gui_project.c
+++ b/src/gui_project.c
@@ -534,6 +534,10 @@ static void handle_var(const char *key, const char *val,
proj->show_centre = parse_int(val);
}
+ if ( strcmp(key, "rescan_on_change") == 0 ) {
+ proj->rescan_on_change = parse_int(val);
+ }
+
if ( strcmp(key, "show_peaks") == 0 ) {
proj->show_peaks = parse_int(val);
}
@@ -1140,6 +1144,7 @@ int save_project(struct crystfelproject *proj)
fprintf(fh, "show_peaks %i\n", proj->show_peaks);
fprintf(fh, "show_refls %i\n", proj->show_refls);
fprintf(fh, "label_refls %i\n", proj->label_refls);
+ fprintf(fh, "rescan_on_change %i\n", proj->rescan_on_change);
fprintf(fh, "-----\n");
for ( iresult=0; iresult<proj->n_results; iresult++ ) {
@@ -1234,6 +1239,7 @@ int default_project(struct crystfelproject *proj)
proj->show_peaks = 1;
proj->show_refls = 1;
proj->label_refls = 1;
+ proj->rescan_on_change = 1;
proj->peak_search_params.method = PEAK_ZAEF;
proj->peak_search_params.threshold = 800.0;