Author: post
Date: 2010-06-29 19:29:17 +0200 (Tue, 29 Jun 2010)
New Revision: 3451

Modified:
   trunk/librawstudio/rs-curve.c
Log:
Make Shift+Left button also delete point on curve.

Modified: trunk/librawstudio/rs-curve.c
===================================================================
--- trunk/librawstudio/rs-curve.c       2010-06-28 20:21:33 UTC (rev 3450)
+++ trunk/librawstudio/rs-curve.c       2010-06-29 17:29:17 UTC (rev 3451)
@@ -914,21 +914,26 @@
        x = event->x/w;
        y = 1.0 - event->y/h;
 
+       gint button = event->button;
+       /* Shift+Left = Middle button */
+       if (button == 1 && (event->state&GDK_SHIFT_MASK))
+               button = 2;
+       
        /* Add a point */
-       if ((event->button==1) && (curve->active_knot==-1))
+       if ((button==1) && (curve->active_knot==-1))
                rs_curve_widget_add_knot(curve, x, y);
-       else if ((event->button==1) && (curve->active_knot>=0))
+       else if (button == 1 && (curve->active_knot >= 0))
                rs_spline_move(curve->spline, curve->active_knot, x, y);
 
        /* Delete a point if not first or last */
-       else if ((event->button==2)
+       else if (button == 2
                && (curve->active_knot>0)
                && (curve->active_knot<(rs_spline_length(curve->spline)-1)))
        {
                rs_spline_delete(curve->spline, curve->active_knot);
                curve->active_knot = -1;
        }
-       else if (event->button==3)
+       else if (button == 3)
                g_signal_emit (G_OBJECT (curve), 
                        signals[RIGHTCLICK_SIGNAL], 0);
 


_______________________________________________
Rawstudio-commit mailing list
[email protected]
http://rawstudio.org/cgi-bin/mailman/listinfo/rawstudio-commit

Reply via email to