Proper fix: change the poll function to reflect actual operator requirements.
This commit is contained in:
Martin Poirier 2010-11-14 18:27:25 +00:00
parent bc7903c858
commit 7f0877f0dc
2 changed files with 9 additions and 11 deletions

@ -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");

@ -342,9 +342,8 @@ void BIF_removeTransformOrientationIndex(bContext *C, int index) {
}
void BIF_selectTransformOrientation(bContext *C, TransformOrientation *target) {
View3D *v3d = CTX_wm_view3d(C);
if(v3d) {
ListBase *transform_spaces = &CTX_data_scene(C)->transform_spaces;
View3D *v3d = CTX_wm_view3d(C);
TransformOrientation *ts = transform_spaces->first;
int i;
@ -355,7 +354,6 @@ void BIF_selectTransformOrientation(bContext *C, TransformOrientation *target) {
}
}
}
}
void BIF_selectTransformOrientationValue(bContext *C, int orientation) {
View3D *v3d = CTX_wm_view3d(C);