patch [#37217] Make WM_gesture_lines draw the lasso unfilled. (Adding reroute nodes...
authorCampbell Barton <ideasman42@gmail.com>
Tue, 29 Oct 2013 00:05:03 +0000 (00:05 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 29 Oct 2013 00:05:03 +0000 (00:05 +0000)
by Henrik Aarnio (hjaarnio)

source/blender/windowmanager/intern/wm_gesture.c

index 05ee23e2361ae57181708e1c50066ea774db9284..4d4d46d063aa4ee1afb2144c6dbc8ef9107db56b 100644 (file)
@@ -293,13 +293,15 @@ static void draw_filled_lasso(wmWindow *win, wmGesture *gt)
 }
 
 
-static void wm_gesture_draw_lasso(wmWindow *win, wmGesture *gt)
+static void wm_gesture_draw_lasso(wmWindow *win, wmGesture *gt, bool filled)
 {
        short *lasso = (short *)gt->customdata;
        int i;
 
-       draw_filled_lasso(win, gt);
-       
+       if (filled) {
+               draw_filled_lasso(win, gt);
+       }
+
        glEnable(GL_LINE_STIPPLE);
        glColor3ub(96, 96, 96);
        glLineStipple(1, 0xAAAA);
@@ -365,9 +367,9 @@ void wm_gesture_draw(wmWindow *win)
                                wm_gesture_draw_cross(win, gt);
                }
                else if (gt->type == WM_GESTURE_LINES)
-                       wm_gesture_draw_lasso(win, gt);
+                       wm_gesture_draw_lasso(win, gt, false);
                else if (gt->type == WM_GESTURE_LASSO)
-                       wm_gesture_draw_lasso(win, gt);
+                       wm_gesture_draw_lasso(win, gt, true);
                else if (gt->type == WM_GESTURE_STRAIGHTLINE)
                        wm_gesture_draw_line(gt);
        }