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:
authorNathan Craddock <nzcraddock@gmail.com>2020-06-30 05:23:28 +0300
committerNathan Craddock <nzcraddock@gmail.com>2020-06-30 19:57:27 +0300
commit7dbfc864e6f851869fb8ec46fc8755c034028590 (patch)
tree22293aab22bbb7f4b110f55149e29eefc6096d92 /source/blender/editors/space_outliner/outliner_dragdrop.c
parent21c2a64e79fe7cc2430a8a434482e4ef1310dd55 (diff)
Outliner: Add auto scrolling during drag and drop
Pan the view when dragging elements near the borders. This uses the same operator that scrolls the region during modifiers drag and drop.
Diffstat (limited to 'source/blender/editors/space_outliner/outliner_dragdrop.c')
-rw-r--r--source/blender/editors/space_outliner/outliner_dragdrop.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/editors/space_outliner/outliner_dragdrop.c b/source/blender/editors/space_outliner/outliner_dragdrop.c
index c2c9f3a5bfb..70a628eead0 100644
--- a/source/blender/editors/space_outliner/outliner_dragdrop.c
+++ b/source/blender/editors/space_outliner/outliner_dragdrop.c
@@ -907,6 +907,9 @@ static int outliner_item_drag_drop_invoke(bContext *C,
return (OPERATOR_CANCELLED | OPERATOR_PASS_THROUGH);
}
+ /* Scroll view when dragging near edges */
+ WM_operator_name_call(C, "VIEW2D_OT_edge_pan", WM_OP_INVOKE_DEFAULT, NULL);
+
wmDrag *drag = WM_event_start_drag(C, data.icon, WM_DRAG_ID, NULL, 0.0, WM_DRAG_NOP);
if (ELEM(GS(data.drag_id->name), ID_OB, ID_GR)) {