fix corner case where dragged item highlights red due to non-move

This commit is contained in:
Tyfon
2024-06-22 11:36:18 -07:00
parent ab23705cdb
commit f4b7fae31d

View File

@@ -509,6 +509,7 @@ namespace UIFixes
{
// Moving item to the same place, cool, not a problem
__result = true;
operation = default;
if (showHighlights && selectedItemContext.Item.Parent is GClass2769 gridAddress)
{
ShowPreview(__instance, selectedItemContext, gridAddress, R.GridView.ValidMoveColor);
@@ -535,6 +536,11 @@ namespace UIFixes
{
HidePreviews();
}
else
{
// In success, we want operation to be the first (last in stack), to represent the item being dragged
operation = operations.Last();
}
// Didn't simulate so now undo
while (operations.Any())