Page MenuHome

Fix T84953: Incorrect tooltip for dragging collections
ClosedPublic

Authored by Hans Goudey (HooglyBoogly) on Jan 26 2021, 12:36 AM.

Details

Summary

"Shift to parent" does not make any sense for collections since they don't
have parenting like objects. This commit just adds a simple check for
whether the first drag ID is a collection.

Checking only the first ID works here because only ID types that match
that of the "dragged" (under the mouse) element are moved as part of the
drag. I figured looping through all of the IDs here would be discouraged,
a more complete check would be easy to add if it isn't.

Diff Detail

Repository
rB Blender

Event Timeline

Hans Goudey (HooglyBoogly) requested review of this revision.Jan 26 2021, 12:36 AM
Hans Goudey (HooglyBoogly) created this revision.
Aaron Carlisle (Blendify) added inline comments.
source/blender/editors/space_outliner/outliner_dragdrop.c
1216

The use of braces here does not follow the style guide

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

Hah, doesn't the style guide say Always Use Braces? For switch statements I've seen it both ways, it depends on the case I think.

Anyway, the braces are required for declaring variables inside case blocks. (Not the last case actually, but it's good practice).

Hans Goudey (HooglyBoogly) planned changes to this revision.Feb 24 2021, 5:35 PM

Instead of checking if the drag ID is a collection, it should check if it's an object.

It should be okay to just commit this, since @Julian Eisel (Severin) and I talked about it and I made the change we discussed.

This revision was not accepted when it landed; it landed in state Changes Planned.Feb 26 2021, 2:23 AM
This revision was automatically updated to reflect the committed changes.