diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2013-04-12 19:45:44 +0400 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2013-04-12 19:45:44 +0400 |
commit | 8f658d42643b5edb03d4ae16ca8f9f611b1fbf74 (patch) | |
tree | 7425336672e6f3bebcea5a80aeaaab624d0007ef /source | |
parent | 58d211acdd8176137efd582b54f7602447aa3b07 (diff) |
Add property update for radial control operator. It will be necessary
for upcoming overlay refresh commit, but since that commit is becoming
too big, better have this separate to avoid getting this lost in the
noise.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/windowmanager/intern/wm_operators.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c index 1fac48259c1..5ba94138c5a 100644 --- a/source/blender/windowmanager/intern/wm_operators.c +++ b/source/blender/windowmanager/intern/wm_operators.c @@ -3677,14 +3677,16 @@ static int radial_control_invoke(bContext *C, wmOperator *op, const wmEvent *eve return OPERATOR_RUNNING_MODAL; } -static void radial_control_set_value(RadialControl *rc, float val) +static void radial_control_set_value(bContext *C, RadialControl *rc, float val) { switch (rc->type) { case PROP_INT: RNA_property_int_set(&rc->ptr, rc->prop, val); + RNA_property_update(C, &rc->ptr, rc->prop); break; case PROP_FLOAT: RNA_property_float_set(&rc->ptr, rc->prop, val); + RNA_property_update(C, &rc->ptr, rc->prop); break; default: break; @@ -3758,14 +3760,14 @@ static int radial_control_modal(bContext *C, wmOperator *op, const wmEvent *even /* clamp and update */ CLAMP(new_value, rc->min_value, rc->max_value); - radial_control_set_value(rc, new_value); + radial_control_set_value(C, rc, new_value); rc->current_value = new_value; break; case ESCKEY: case RIGHTMOUSE: /* canceled; restore original value */ - radial_control_set_value(rc, rc->initial_value); + radial_control_set_value(C, rc, rc->initial_value); ret = OPERATOR_CANCELLED; break; |