diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-02-12 14:33:04 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-02-12 14:33:04 +0400 |
commit | ddf1d987e51fee773c9004ce9a09210678f92a3d (patch) | |
tree | 8f13fde8b5d3e1f09afec144d64a8daa2d0e8969 /source/blender/windowmanager | |
parent | 261295180c13f613df32a0ae6496486096b532e7 (diff) |
fix for own commit r54482, PROP_DISTANCE was being checked for by radial control operator. now allow PROP_NONE and treat it as a distance.
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r-- | source/blender/windowmanager/intern/wm_operators.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c index a720d61f9d0..41dd618caa5 100644 --- a/source/blender/windowmanager/intern/wm_operators.c +++ b/source/blender/windowmanager/intern/wm_operators.c @@ -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; |