Fix T86947: Drag & Drop tooltip in Scene mode

The tooltip while dragging a collection in Scene mode in the Outliner
was always "Link inside Collection" even if the action performed was
different. This was because the `collection_drop_init` set the
`from_collection` always to `NULL` if the Outliner display mode was
currently set to Scene.
Commit that introduced this issue:
rB0f54c3a9b75be8f8db9022fb0aeb0f8d0d4f0299

The fix removes the check of the display mode and only sets the
`from_collection` to `NULL` if the ctrl (linking) key is held.

Reviewed By: JacquesLucke

Maniphest Tasks: T86947

Differential Revision: https://developer.blender.org/D10864
This commit is contained in:
Falk David 2021-03-31 14:22:55 +02:00
parent 8d45a96789
commit d97dca5106
Notes: blender-bot 2023-02-14 08:59:10 +01:00
Referenced by issue #86947, Outliner: wrong tooltip for moving collections (Scenes mode)
1 changed files with 2 additions and 4 deletions

View File

@ -1104,9 +1104,7 @@ static bool collection_drop_init(bContext *C,
const wmEvent *event,
CollectionDrop *data)
{
SpaceOutliner *space_outliner = CTX_wm_space_outliner(C);
/* Get collection to drop into. */
/* Get collection to drop into. */
TreeElementInsertType insert_type;
TreeElement *te = outliner_drop_insert_collection_find(C, event, &insert_type);
if (!te) {
@ -1140,7 +1138,7 @@ static bool collection_drop_init(bContext *C,
/* Get collection to drag out of. */
ID *parent = drag_id->from_parent;
Collection *from_collection = collection_parent_from_ID(parent);
if (event->ctrl || space_outliner->outlinevis == SO_SCENES) {
if (event->ctrl) {
from_collection = NULL;
}