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/transform/transform_ops.c')
-rw-r--r--source/blender/editors/transform/transform_ops.c21
1 files changed, 9 insertions, 12 deletions
diff --git a/source/blender/editors/transform/transform_ops.c b/source/blender/editors/transform/transform_ops.c
index f86bcc41bee..ab9548ad52e 100644
--- a/source/blender/editors/transform/transform_ops.c
+++ b/source/blender/editors/transform/transform_ops.c
@@ -516,22 +516,19 @@ static int transform_invoke(bContext *C, wmOperator *op, const wmEvent *event)
if ((event == NULL) && RNA_struct_property_is_set(op->ptr, "value")) {
return transform_exec(C, op);
}
- else {
- /* add temp handler */
- WM_event_add_modal_handler(C, op);
- op->flag |= OP_IS_MODAL_GRAB_CURSOR; // XXX maybe we want this with the gizmo only?
+ /* add temp handler */
+ WM_event_add_modal_handler(C, op);
- /* Use when modal input has some transformation to begin with. */
- {
- TransInfo *t = op->customdata;
- if (UNLIKELY(!is_zero_v4(t->values_modal_offset))) {
- transformApply(C, t);
- }
- }
+ op->flag |= OP_IS_MODAL_GRAB_CURSOR; // XXX maybe we want this with the gizmo only?
- return OPERATOR_RUNNING_MODAL;
+ /* Use when modal input has some transformation to begin with. */
+ TransInfo *t = op->customdata;
+ if (UNLIKELY(!is_zero_v4(t->values_modal_offset))) {
+ transformApply(C, t);
}
+
+ return OPERATOR_RUNNING_MODAL;
}
static bool transform_poll_property(const bContext *UNUSED(C),