aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2021-02-23 15:04:32 +0100
committerThomas White <taw@physics.org>2021-02-23 15:10:43 +0100
commitba297b8c672e9058cc727ed2c81679760aad98b5 (patch)
tree6bc12094b90b7033cab8eb99fe8f389a86ee6ed5 /src
parent05f06f5e8dd990f63aa28edc5517040fe953d646 (diff)
GUI: Add option for manual zoom reset
This is sometimes necessary, such as when switching between results with drastically different geometries (which obviously shouldn't happen much!).
Diffstat (limited to 'src')
-rw-r--r--src/crystfel_gui.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/crystfel_gui.c b/src/crystfel_gui.c
index 3c8b14e4..5d71172e 100644
--- a/src/crystfel_gui.c
+++ b/src/crystfel_gui.c
@@ -636,6 +636,13 @@ static gint rescan_sig(GtkWidget *widget, struct crystfelproject *proj)
}
+static gint reset_zoom_sig(GtkWidget *widget, struct crystfelproject *proj)
+{
+ crystfel_image_view_reset_zoom(CRYSTFEL_IMAGE_VIEW(proj->imageview));
+ return FALSE;
+}
+
+
static gint first_frame_sig(GtkWidget *widget,
struct crystfelproject *proj)
{
@@ -807,6 +814,8 @@ static void add_menu_bar(struct crystfelproject *proj, GtkWidget *vbox)
" <menuitem name=\"peaks\" action=\"PeaksAction\" />"
" <menuitem name=\"refls\" action=\"ReflsAction\" />"
" <menuitem name=\"labelrefls\" action=\"LabelReflsAction\" />"
+ " <separator />"
+ " <menuitem name=\"resetzoom\" action=\"ResetZoomAction\" />"
"</menu>"
"<menu name=\"tools\" action=\"ToolsAction\" >"
" <menuitem name=\"rescan\" action=\"RescanAction\" />"
@@ -825,6 +834,8 @@ static void add_menu_bar(struct crystfelproject *proj, GtkWidget *vbox)
G_CALLBACK(quit_sig) },
{ "ViewAction", NULL, "_View", NULL, NULL, NULL },
+ { "ResetZoomAction", NULL, "Reset zoom", NULL, NULL,
+ G_CALLBACK(reset_zoom_sig) },
{ "ToolsAction", NULL, "_Tools", NULL, NULL, NULL },
{ "RescanAction", NULL, "Rescan streams", NULL, NULL,