Mesh loop tools allowed to be invoked outside 3d region (properties).
That caused crash, it needs 3d view code to work.
This commit is contained in:
Ton Roosendaal
2010-11-10 18:00:51 +00:00
parent 8df02539ba
commit 3b5ad51719
2 changed files with 5 additions and 5 deletions

View File

@@ -2114,7 +2114,7 @@ void MESH_OT_loop_select(wmOperatorType *ot)
/* api callbacks */
ot->invoke= mesh_select_loop_invoke;
ot->poll= ED_operator_editmesh_view3d;
ot->poll= ED_operator_editmesh_region_view3d;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -2220,7 +2220,7 @@ static int mesh_shortest_path_select_invoke(bContext *C, wmOperator *UNUSED(op),
static int mesh_shortest_path_select_poll(bContext *C)
{
if(ED_operator_editmesh_view3d(C)) {
if(ED_operator_editmesh_region_view3d(C)) {
Object *obedit= CTX_data_edit_object(C);
EditMesh *em= BKE_mesh_get_editmesh(obedit->data);
return (em->selectmode & SCE_SELECT_EDGE);
@@ -2545,7 +2545,7 @@ void MESH_OT_select_linked_pick(wmOperatorType *ot)
/* api callbacks */
ot->invoke= select_linked_pick_invoke;
ot->poll= ED_operator_editmesh_view3d;
ot->poll= ED_operator_editmesh_region_view3d;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;

View File

@@ -490,7 +490,7 @@ void MESH_OT_edgering_select (wmOperatorType *ot)
/* callbacks */
ot->invoke= ringsel_invoke;
ot->poll= ED_operator_editmesh_view3d;
ot->poll= ED_operator_editmesh_region_view3d;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -509,7 +509,7 @@ void MESH_OT_loopcut (wmOperatorType *ot)
ot->invoke= ringcut_invoke;
ot->modal= ringcut_modal;
ot->cancel= ringcut_cancel;
ot->poll= ED_operator_editmesh_view3d;
ot->poll= ED_operator_editmesh_region_view3d;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;