diff options
author | Valerio Mariani <valerio.mariani@desy.de> | 2014-01-29 17:24:15 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2014-04-25 16:58:49 +0200 |
commit | b42fa256f456c13800c8dec026d0802561fa098d (patch) | |
tree | 4e6ac65ca9be00c146f4adc3ee358529d7b965df /src/dw-hdfsee.c | |
parent | 6d9eff9db89360fafe79493fe0f9bc907499a899 (diff) |
Arrow keys can be used to move to the previous/next quadrant, with wraparound
Diffstat (limited to 'src/dw-hdfsee.c')
-rw-r--r-- | src/dw-hdfsee.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/dw-hdfsee.c b/src/dw-hdfsee.c index 73a56832..57033916 100644 --- a/src/dw-hdfsee.c +++ b/src/dw-hdfsee.c @@ -1902,7 +1902,23 @@ static gint displaywindow_keypress(GtkWidget *widget, GdkEventKey *event, redraw_window(dw); break; - case GDK_1: + case GDK_plus: + if (dw->calib_mode_curr_quad == (dw->image->det->n_rigid_groups-1)) { + dw->calib_mode_curr_quad = 0; + } else { + dw->calib_mode_curr_quad += 1; + } + break; + + case GDK_minus: + if (dw->calib_mode_curr_quad == 0) { + dw->calib_mode_curr_quad = (dw->image->det->n_rigid_groups-1); + } else { + dw->calib_mode_curr_quad -= 1; + } + break; + + case GDK_1: dw->calib_mode_curr_quad = 0; break; |