aboutsummaryrefslogtreecommitdiff
path: root/src/crystfel_gui.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2020-07-06 14:24:34 +0200
committerThomas White <taw@physics.org>2020-07-29 18:53:45 +0200
commitce12bf3b6739a7a149f2cbed62951240dd536cab (patch)
tree1b762078d8760a54f1d7467ceff03daf8c2e6803 /src/crystfel_gui.c
parent4e64ee724415f5e2e0acf2846c77bbf293368364 (diff)
Show reflections in GUI
Diffstat (limited to 'src/crystfel_gui.c')
-rw-r--r--src/crystfel_gui.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/crystfel_gui.c b/src/crystfel_gui.c
index 8ab8a7fb..f60555f8 100644
--- a/src/crystfel_gui.c
+++ b/src/crystfel_gui.c
@@ -609,6 +609,15 @@ static gint show_peaks_sig(GtkWidget *w, struct crystfelproject *proj)
}
+static gint show_refls_sig(GtkWidget *w, struct crystfelproject *proj)
+{
+ proj->show_refls = gtk_toggle_action_get_active(GTK_TOGGLE_ACTION(w));
+ crystfel_image_view_set_show_reflections(CRYSTFEL_IMAGE_VIEW(proj->imageview),
+ proj->show_refls);
+ return FALSE;
+}
+
+
static void add_menu_bar(struct crystfelproject *proj, GtkWidget *vbox)
{
GError *error = NULL;
@@ -620,6 +629,7 @@ static void add_menu_bar(struct crystfelproject *proj, GtkWidget *vbox)
"</menu>"
"<menu name=\"view\" action=\"ViewAction\" >"
" <menuitem name=\"peaks\" action=\"PeaksAction\" />"
+ " <menuitem name=\"refls\" action=\"ReflsAction\" />"
"</menu>"
"<menu name=\"tools\" action=\"ToolsAction\" >"
"</menu>"
@@ -649,6 +659,8 @@ static void add_menu_bar(struct crystfelproject *proj, GtkWidget *vbox)
GtkToggleActionEntry toggles[] = {
{ "PeaksAction", NULL, "Peak detection results", NULL, NULL,
G_CALLBACK(show_peaks_sig), FALSE },
+ { "ReflsAction", NULL, "Calculated reflection positions", NULL, NULL,
+ G_CALLBACK(show_refls_sig), FALSE },
};
proj->action_group = gtk_action_group_new("cellwindow");