Transform: Allow navigation with "release_confirm"

This limitation was added to avoid conflicts with tools.

But since we now have the "allow_navigation" option on transform
operators, there is no real benefit to having this limitation.
This commit is contained in:
Germano Cavalcante
2023-06-05 16:04:25 -03:00
committed by Germano Cavalcante
parent 251614c39c
commit 05b8cfec5e
2 changed files with 4 additions and 12 deletions

View File

@@ -1043,17 +1043,9 @@ class VIEW3D_MT_transform_base:
"use_transform_navigation",
False)
props = layout.operator("transform.translate")
props.release_confirm = False
props.allow_navigation = allow_navigation
props = layout.operator("transform.rotate")
props.release_confirm = False
props.allow_navigation = allow_navigation
props = layout.operator("transform.resize", text="Scale")
props.release_confirm = False
props.allow_navigation = allow_navigation
layout.operator("transform.translate").allow_navigation = allow_navigation
layout.operator("transform.rotate").allow_navigation = allow_navigation
layout.operator("transform.resize", text="Scale").allow_navigation = allow_navigation
layout.separator()

View File

@@ -658,7 +658,7 @@ void initTransInfo(bContext *C, TransInfo *t, wmOperator *op, const wmEvent *eve
t->flag |= T_NO_CURSOR_WRAP;
}
if (op && (t->flag & T_MODAL) && !(t->flag & T_RELEASE_CONFIRM) &&
if (op && (t->flag & T_MODAL) &&
(prop = RNA_struct_find_property(op->ptr, "allow_navigation")) &&
RNA_property_boolean_get(op->ptr, prop))
{