From 3582824afa3ec3d45f59e10e5de06af8a720f129 Mon Sep 17 00:00:00 2001 From: Simon Jackson Date: Sat, 23 Apr 2022 11:49:46 +0100 Subject: [PATCH] Applying PR manually, because Bitbucket https://bitbucket.org/UnityUIExtensions/unity-ui-extensions/pull-requests/128 --- .../Controls/ReorderableList/ReorderableListElement.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Runtime/Scripts/Controls/ReorderableList/ReorderableListElement.cs b/Runtime/Scripts/Controls/ReorderableList/ReorderableListElement.cs index b8768dc..8cba2f9 100644 --- a/Runtime/Scripts/Controls/ReorderableList/ReorderableListElement.cs +++ b/Runtime/Scripts/Controls/ReorderableList/ReorderableListElement.cs @@ -381,16 +381,19 @@ namespace UnityEngine.UI.Extensions ToList = _currentReorderableListRaycasted, ToIndex = _fakeElement.GetSiblingIndex() }; + //Send OnelementDropped Event if (_reorderableList && _reorderableList.OnElementDropped != null) { _reorderableList.OnElementDropped.Invoke(args); } - if (!isValid) + + if (!isValid || (!IsTransferable && _currentReorderableListRaycasted != _reorderableList)) { CancelDrag(); return; } + RefreshSizes(); _draggingObject.SetParent(_currentReorderableListRaycasted.Content, false); _draggingObject.rotation = _currentReorderableListRaycasted.transform.rotation;