diff options
author | Thomas White <taw@physics.org> | 2019-06-15 10:11:50 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2019-06-15 10:12:08 +0200 |
commit | e8c301553ba5e105c386d1341162d979df036d43 (patch) | |
tree | 17ee14703bb68b74a2f20f6a6e5ba3af81af42df /src | |
parent | cd31c72d3cba338921b2475e7d08d61c3285a9d9 (diff) |
Handle pan/tilt pair inside set_start_attrs
Diffstat (limited to 'src')
-rw-r--r-- | src/nanolight.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/nanolight.c b/src/nanolight.c index e813ca1..fe4d1a5 100644 --- a/src/nanolight.c +++ b/src/nanolight.c @@ -360,6 +360,11 @@ static void set_start_attrs(struct nanolight *nl, enum attr_class cls) fix->attr_vals_start[n] = fix->attr_vals[n]; } } + + /* If altering tilt, also change pan */ + if ( cls == ATT_TILT ) { + set_start_attrs(nl, ATT_PAN); + } } @@ -375,11 +380,6 @@ static gboolean button_press_sig(GtkWidget *da, GdkEventButton *event, struct na set_start_attrs(nl, nl->sel_attr); - /* If altering tilt, also change pan */ - if ( nl->sel_attr == ATT_TILT ) { - set_start_attrs(nl, ATT_PAN); - } - nl->x_orig = event->x; nl->y_orig = event->y; nl->dragging = 1; |