Page MenuHome

Fix (unreported) dragging outside of outliner scrolling it: UI: Add an outer boundary for edge panning, use in outliner
ClosedPublic

Authored by Hans Goudey (HooglyBoogly) on Jul 2 2020, 10:58 PM.

Details

Summary

This is meant to fix this issue: (Thanks Bobo_The_Imp for the video)

It adds optional behavior for the edge pan operator that makes it only act if the mouse is close enough to the region.

Diff Detail

Repository
rB Blender
Branch
edge-scroll-outer-boundary (branched from master)
Build Status
Buildable 8824
Build 8824: arc lint + arc unit

Event Timeline

Hans Goudey (HooglyBoogly) requested review of this revision.Jul 2 2020, 10:58 PM
Hans Goudey (HooglyBoogly) created this revision.
  • 0 to disable boundary

Thanks for this. It works great and the padding amount seems reasonable.

This revision is now accepted and ready to land.Jul 3 2020, 12:02 AM
Nathan Craddock (natecraddock) requested changes to this revision.Jul 3 2020, 1:03 AM

The behavior is still fine, but I just noticed a memory leak from the outliner dragdrop.

source/blender/editors/space_outliner/outliner_dragdrop.c
916

Memory leak allocated here.

This revision now requires changes to proceed.Jul 3 2020, 1:03 AM
Hans Goudey (HooglyBoogly) marked an inline comment as done.
  • Merge branch 'master' into edge-scroll-outer-boundary
  • Fix memory leak
source/blender/editors/space_outliner/outliner_dragdrop.c
916

Oops, I didn't realize that was necessary.

Looks good now.

source/blender/editors/space_outliner/outliner_dragdrop.c
916

Neither did I, ASAN found that :)

This revision is now accepted and ready to land.Jul 4 2020, 3:52 AM
Hans Goudey (HooglyBoogly) retitled this revision from UI: Add an outer boundary for edge panning, use in outliner to Fix (unreported) dragging outside of outliner scrolling it: UI: Add an outer boundary for edge panning, use in outliner.Jul 20 2020, 10:50 PM
Julian Eisel (Severin) added inline comments.
source/blender/editors/space_outliner/outliner_dragdrop.c
917

Minor request, this code does two operator-type lookups. Not a big issue but easy to avoid:
Use WM_operatortype_find() and pass the OP-type to WM_operator_properties_create_ptr() and WM_operator_name_call_ptr().