aboutsummaryrefslogtreecommitdiff
path: root/src/crystfel_gui.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2021-02-25 17:06:05 +0100
committerThomas White <taw@physics.org>2021-02-25 17:06:05 +0100
commitf1fac55c2023bb0b99a5111167d98565badf48c5 (patch)
treebec3d9bc412056f3d8ea2c451db95032eb13959e /src/crystfel_gui.c
parent3888de614efc03abcafb57e90cd9af89d2e3046d (diff)
GUI: Factorise force_{peaks,refls}_on
This should help avoid them getting out of sync. Again.
Diffstat (limited to 'src/crystfel_gui.c')
-rw-r--r--src/crystfel_gui.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/crystfel_gui.c b/src/crystfel_gui.c
index f3388aed..8b330bb9 100644
--- a/src/crystfel_gui.c
+++ b/src/crystfel_gui.c
@@ -1111,3 +1111,27 @@ GFile *make_job_folder(const char *job_title, const char *job_notes)
return workdir_file;
}
+
+
+void force_peaks_on(struct crystfelproject *proj)
+{
+ GtkWidget *w;
+ proj->show_peaks = 1;
+ crystfel_image_view_set_show_peaks(CRYSTFEL_IMAGE_VIEW(proj->imageview),
+ proj->show_peaks);
+
+ w = gtk_ui_manager_get_widget(proj->ui, "/ui/mainwindow/view/peaks");
+ gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(w), 1);
+}
+
+
+void force_refls_on(struct crystfelproject *proj)
+{
+ GtkWidget *w;
+ proj->show_refls = 1;
+ crystfel_image_view_set_show_peaks(CRYSTFEL_IMAGE_VIEW(proj->imageview),
+ proj->show_refls);
+
+ w = gtk_ui_manager_get_widget(proj->ui, "/ui/mainwindow/view/refls");
+ gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(w), 1);
+}