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:
authorPhilipp Oeser <info@graphics-engineer.com>2021-10-26 14:42:19 +0300
committerPhilipp Oeser <info@graphics-engineer.com>2021-10-27 11:22:06 +0300
commit4d605ef2f413e8ab484743218f0d0517138513d5 (patch)
tree8b3e3b1a9dd430484ebba859d2ef069cd469aab7 /source/blender/editors/include
parentb94447a298146f273c848541a3122afea001ba39 (diff)
Fix T92427: Adding new nodes does no edge-panning
Unlike translating existing nodes [which disables cursor wrapping and enables edge-panning instead since rBSa1cc7042a74], adding new nodes would still show the old behavior of cursor wrapping. This has been disabled for the case when the node whould be added outside (due to menus overlapping other editors). Now enable edge-panning for adding new nodes as well and make sure this only starts once the mouse has returned into the inside rect once. Maniphest Tasks: T92427 Differential Revision: https://developer.blender.org/D13005
Diffstat (limited to 'source/blender/editors/include')
-rw-r--r--source/blender/editors/include/UI_view2d.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/editors/include/UI_view2d.h b/source/blender/editors/include/UI_view2d.h
index e959f9ae7ce..122e5a7d839 100644
--- a/source/blender/editors/include/UI_view2d.h
+++ b/source/blender/editors/include/UI_view2d.h
@@ -315,6 +315,9 @@ typedef struct View2DEdgePanData {
/** View2d we're operating in. */
struct View2D *v2d;
+ /** Panning should only start once being in the inside rect once (e.g. adding nodes can happen
+ * outside). */
+ bool enabled;
/** Inside distance in UI units from the edge of the region within which to start panning. */
float inside_pad;
/** Outside distance in UI units from the edge of the region at which to stop panning. */