fix for own commit r54482, PROP_DISTANCE was being checked for by radial control...
authorCampbell Barton <ideasman42@gmail.com>
Tue, 12 Feb 2013 10:33:04 +0000 (10:33 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 12 Feb 2013 10:33:04 +0000 (10:33 +0000)
source/blender/windowmanager/intern/wm_operators.c

index a720d61f9d062fb3e0227f72e3465a3a98e9b6a2..41dd618caa50f79434c86a87ea41d807933c110b 100644 (file)
@@ -3261,6 +3261,7 @@ static void radial_control_set_initial_mouse(RadialControl *rc, wmEvent *event)
        rc->initial_mouse[1] = event->y;
 
        switch (rc->subtype) {
+               case PROP_NONE:
                case PROP_DISTANCE:
                        d[0] = rc->initial_value;
                        break;
@@ -3360,6 +3361,7 @@ static void radial_control_paint_cursor(bContext *C, int x, int y, void *customd
        float zoom[2], col[3] = {1, 1, 1};
 
        switch (rc->subtype) {
+               case PROP_NONE:
                case PROP_DISTANCE:
                        r1 = rc->current_value;
                        r2 = rc->initial_value;
@@ -3598,8 +3600,8 @@ static int radial_control_invoke(bContext *C, wmOperator *op, wmEvent *event)
 
        /* get subtype of property */
        rc->subtype = RNA_property_subtype(rc->prop);
-       if (!ELEM3(rc->subtype, PROP_DISTANCE, PROP_FACTOR, PROP_ANGLE)) {
-               BKE_report(op->reports, RPT_ERROR, "Property must be a distance, a factor, or an angle");
+       if (!ELEM4(rc->subtype, PROP_NONE, PROP_DISTANCE, PROP_FACTOR, PROP_ANGLE)) {
+               BKE_report(op->reports, RPT_ERROR, "Property must be a none, distance, a factor, or an angle");
                MEM_freeN(rc);
                return OPERATOR_CANCELLED;
        }
@@ -3683,6 +3685,7 @@ static int radial_control_modal(bContext *C, wmOperator *op, wmEvent *event)
 
                        /* calculate new value and apply snapping  */
                        switch (rc->subtype) {
+                               case PROP_NONE:
                                case PROP_DISTANCE:
                                        new_value = dist;
                                        if (snap) new_value = ((int)new_value + 5) / 10 * 10;