Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_select.c')
-rw-r--r--source/blender/editors/space_view3d/view3d_select.c21
1 files changed, 15 insertions, 6 deletions
diff --git a/source/blender/editors/space_view3d/view3d_select.c b/source/blender/editors/space_view3d/view3d_select.c
index 73ceb5c7fdb..0154380b6f3 100644
--- a/source/blender/editors/space_view3d/view3d_select.c
+++ b/source/blender/editors/space_view3d/view3d_select.c
@@ -724,6 +724,9 @@ void VIEW3D_OT_lasso_select(wmOperatorType *ot)
ot->exec= view3d_lasso_select_exec;
ot->poll= WM_operator_winactive;
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+
RNA_def_collection_runtime(ot->srna, "path", &RNA_OperatorMousePath, "Path", "");
RNA_def_enum(ot->srna, "type", lasso_select_types, 0, "Type", "");
}
@@ -1481,7 +1484,6 @@ static int view3d_borderselect_exec(bContext *C, wmOperator *op)
}
MEM_freeN(vbuffer);
}
- ED_undo_push(C,"Border Select");
return OPERATOR_FINISHED;
}
@@ -1507,6 +1509,9 @@ void VIEW3D_OT_borderselect(wmOperatorType *ot)
ot->poll= ED_operator_view3d_active;
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+
/* rna */
RNA_def_int(ot->srna, "event_type", 0, INT_MIN, INT_MAX, "Event Type", "", INT_MIN, INT_MAX);
RNA_def_int(ot->srna, "xmin", 0, INT_MIN, INT_MAX, "X Min", "", INT_MIN, INT_MAX);
@@ -1545,10 +1550,9 @@ static int view3d_select_invoke(bContext *C, wmOperator *op, wmEvent *event)
}
else
mouse_select(C, mval, extend, 0);
-
- ED_undo_push(C,"Mouse Select");
+
/* allowing tweaks */
- return OPERATOR_PASS_THROUGH;
+ return OPERATOR_PASS_THROUGH|OPERATOR_FINISHED;
}
void VIEW3D_OT_select(wmOperatorType *ot)
@@ -1560,7 +1564,10 @@ void VIEW3D_OT_select(wmOperatorType *ot)
/* api callbacks */
ot->invoke= view3d_select_invoke;
ot->poll= ED_operator_view3d_active;
-
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+
/* properties */
RNA_def_enum(ot->srna, "type", prop_select_types, 0, "Type", "");
}
@@ -1774,7 +1781,6 @@ static int view3d_circle_select_exec(bContext *C, wmOperator *op)
WM_event_add_notifier(C, NC_SCENE|ND_OB_SELECT, CTX_data_scene(C));
}
- ED_undo_push(C,"Circle Select");
return OPERATOR_FINISHED;
}
@@ -1788,6 +1794,9 @@ void VIEW3D_OT_circle_select(wmOperatorType *ot)
ot->exec= view3d_circle_select_exec;
ot->poll= ED_operator_view3d_active;
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+
RNA_def_int(ot->srna, "x", 0, INT_MIN, INT_MAX, "X", "", INT_MIN, INT_MAX);
RNA_def_int(ot->srna, "y", 0, INT_MIN, INT_MAX, "Y", "", INT_MIN, INT_MAX);
RNA_def_int(ot->srna, "radius", 0, INT_MIN, INT_MAX, "Radius", "", INT_MIN, INT_MAX);