Fix #101374: enable edge panning for move operators in menus

This patch enables edge panning for the operators where there was
a mismatch in behaviour between using the shortcut `G` and the
"Move" operator exposed via the menu and operator search.

Commit 19da434e9c introduced a `view2d_edge_pan` property which
was activated for the translate operators invoked when pressing G in
the default keymap.
The property is not enabled by default, to avoid it getting in the
way in some cases, so the "Move" operators exposed via the menus
didn't have edge panning. This lead to inconsistent behavior between
moving via the shortcut or via the menu.

Pull Request: https://projects.blender.org/blender/blender/pulls/104482
This commit is contained in:
Leon Schittek
2023-03-10 16:22:48 +01:00
committed by Leon Schittek
parent 466eb426ed
commit 382a54aefb
2 changed files with 2 additions and 2 deletions

View File

@@ -312,7 +312,7 @@ class NODE_MT_node(Menu):
snode = context.space_data
is_compositor = snode.tree_type == 'CompositorNodeTree'
layout.operator("transform.translate")
layout.operator("transform.translate").view2d_edge_pan = True
layout.operator("transform.rotate")
layout.operator("transform.resize")

View File

@@ -836,7 +836,7 @@ class SEQUENCER_MT_strip_transform(Menu):
layout.operator("transform.rotate", text="Rotate")
layout.operator("transform.resize", text="Scale")
else:
layout.operator("transform.seq_slide", text="Move")
layout.operator("transform.seq_slide", text="Move").view2d_edge_pan = True
layout.operator("transform.transform", text="Move/Extend from Current Frame").mode = 'TIME_EXTEND'
layout.operator("sequencer.slip", text="Slip Strip Contents")