aboutsummaryrefslogtreecommitdiff
path: root/src/gui_peaksearch.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2020-09-07 15:19:44 +0200
committerThomas White <taw@physics.org>2020-09-07 17:11:26 +0200
commitd7d9c14116a4e1c41fe61a8caacc9129df62100e (patch)
tree77ee88289d72a5b9114913dff2c9ef231786ade7 /src/gui_peaksearch.c
parent0aa73643db0e345f9df397a88d5cd59f1c665214 (diff)
Fix update_peaks logic
Diffstat (limited to 'src/gui_peaksearch.c')
-rw-r--r--src/gui_peaksearch.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/src/gui_peaksearch.c b/src/gui_peaksearch.c
index 24f35623..3bbb92bb 100644
--- a/src/gui_peaksearch.c
+++ b/src/gui_peaksearch.c
@@ -44,6 +44,7 @@
#include "crystfelimageview.h"
#include "gui_project.h"
+#include "crystfel_gui.h"
void update_peaks(struct crystfelproject *proj)
@@ -51,9 +52,6 @@ void update_peaks(struct crystfelproject *proj)
if ( proj->n_frames == 0 ) return;
if ( proj->cur_image == NULL ) return;
- crystfel_image_view_set_show_peaks(CRYSTFEL_IMAGE_VIEW(proj->imageview),
- proj->show_peaks);
-
if ( proj->show_peaks ) {
image_feature_list_free(proj->cur_image->features);
@@ -115,9 +113,6 @@ void update_peaks(struct crystfelproject *proj)
break;
}
-
- crystfel_image_view_set_image(CRYSTFEL_IMAGE_VIEW(proj->imageview),
- proj->cur_image);
}
}
@@ -136,7 +131,7 @@ static void check_param_callback(GtkWidget *checkbox,
{
int val = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(checkbox));
*(vals->pival) = val;
- update_peaks(vals->proj);
+ update_imageview(vals->proj);
}
@@ -156,7 +151,7 @@ static void int_param_callback(GtkWidget *entry,
if ( strcmp(cbvals->str_val, text) != 0 ) {
*(cbvals->pival) = val;
cbvals->proj->unsaved = 1;
- update_peaks(cbvals->proj);
+ update_imageview(cbvals->proj);
free(cbvals->str_val);
cbvals->str_val = strdup(text);
}
@@ -188,7 +183,7 @@ static void float_param_callback(GtkWidget *entry,
if ( strcmp(cbvals->str_val, text) != 0 ) {
*(cbvals->pfval) = val;
cbvals->proj->unsaved = 1;
- update_peaks(cbvals->proj);
+ update_imageview(cbvals->proj);
free(cbvals->str_val);
cbvals->str_val = strdup(text);
}
@@ -420,7 +415,6 @@ static void peaksearch_algo_changed(GtkWidget *combo,
gtk_widget_show_all(proj->peak_vbox);
proj->unsaved = 1;
- update_peaks(proj);
}
@@ -433,7 +427,7 @@ static void peaksearch_response_sig(GtkWidget *dialog, gint resp,
proj->peak_search_params = proj->original_params;
}
- update_peaks(proj);
+ update_imageview(proj);
gtk_widget_destroy(dialog);
proj->peak_vbox = NULL;
proj->peak_params = NULL;