diff options
author | Martin Poirier <theeth@yahoo.com> | 2010-11-14 21:27:25 +0300 |
---|---|---|
committer | Martin Poirier <theeth@yahoo.com> | 2010-11-14 21:27:25 +0300 |
commit | 7f0877f0dc0ae4191a9bc608bad85c81693c15dd (patch) | |
tree | 2f89ec2c54de7d02ed49f0ac06a64cb17a555a6a /source/blender/editors | |
parent | bc7903c858be3464b26a235ca341766f406b3eca (diff) |
bugfix [#24697]
Proper fix: change the poll function to reflect actual operator requirements.
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/transform/transform_ops.c | 2 | ||||
-rw-r--r-- | source/blender/editors/transform/transform_orientations.c | 18 |
2 files changed, 9 insertions, 11 deletions
diff --git a/source/blender/editors/transform/transform_ops.c b/source/blender/editors/transform/transform_ops.c index 381612bf1ef..94af243eb0e 100644 --- a/source/blender/editors/transform/transform_ops.c +++ b/source/blender/editors/transform/transform_ops.c @@ -171,7 +171,7 @@ void TRANSFORM_OT_select_orientation(struct wmOperatorType *ot) /* api callbacks */ ot->invoke = select_orientation_invoke; ot->exec = select_orientation_exec; - ot->poll = ED_operator_areaactive; + ot->poll = ED_operator_view3d_active; prop= RNA_def_property(ot->srna, "orientation", PROP_ENUM, PROP_NONE); RNA_def_property_ui_text(prop, "Orientation", "Transformation orientation"); diff --git a/source/blender/editors/transform/transform_orientations.c b/source/blender/editors/transform/transform_orientations.c index 69cd9a3c03e..dcfad455575 100644 --- a/source/blender/editors/transform/transform_orientations.c +++ b/source/blender/editors/transform/transform_orientations.c @@ -342,17 +342,15 @@ void BIF_removeTransformOrientationIndex(bContext *C, int index) { } void BIF_selectTransformOrientation(bContext *C, TransformOrientation *target) { + ListBase *transform_spaces = &CTX_data_scene(C)->transform_spaces; View3D *v3d = CTX_wm_view3d(C); - if(v3d) { - ListBase *transform_spaces = &CTX_data_scene(C)->transform_spaces; - TransformOrientation *ts = transform_spaces->first; - int i; - - for (i = 0, ts = transform_spaces->first; ts; ts = ts->next, i++) { - if (ts == target) { - v3d->twmode = V3D_MANIP_CUSTOM + i; - break; - } + TransformOrientation *ts = transform_spaces->first; + int i; + + for (i = 0, ts = transform_spaces->first; ts; ts = ts->next, i++) { + if (ts == target) { + v3d->twmode = V3D_MANIP_CUSTOM + i; + break; } } } |