aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2021-04-30 15:06:04 +0200
committerThomas White <taw@physics.org>2021-04-30 15:20:03 +0200
commitf3a7fcdd7112d9693ffbe883ca4e01edfbb48cee (patch)
treef92adf4b0fdf59c93a0eae1736976437f994c37c
parent2451efe97610ed5aef5bc99795f2e4b50747eaf3 (diff)
GUI: When indexing one frame, don't force results selector or repeat peak search
The logic behind forcing the results selector (to "Calculations within GUI") was that anything calculated in the GUI should appear under that selection only. Unfortunately, when loading a stream without images, there is nothing at all to be seen under this selection, not even an image. Forcing the selector resulted in proj->cur_image = NULL and therefore a crash when trying to index based on that. Similarly, the call to update_peaks expected image data, but there is none. In reality, we have a perfectly good image structure with peaks from the stream already. This allows a non-image stream to be "re-indexed" based on the peaks. Fixes: https://gitlab.desy.de/thomas.white/crystfel/-/issues/33
-rw-r--r--src/gui_index.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui_index.c b/src/gui_index.c
index ba9302a3..b36ebff2 100644
--- a/src/gui_index.c
+++ b/src/gui_index.c
@@ -505,7 +505,9 @@ static void run_indexing_once(struct crystfelproject *proj)
cell = NULL;
}
- update_peaks(proj);
+ if ( proj->cur_image->features == NULL ) {
+ update_peaks(proj);
+ }
old_cwd = getcwd(NULL, 0);
tmpdir = enter_gui_tempdir();
@@ -585,8 +587,6 @@ static void index_one_response_sig(GtkWidget *dialog, gint resp,
{
if ( resp == GTK_RESPONSE_OK ) {
- gtk_combo_box_set_active(GTK_COMBO_BOX(proj->results_combo),
- 0);
get_indexing_opts(proj,
CRYSTFEL_INDEXING_OPTS(proj->indexing_opts));
run_indexing_once(proj);