From f4b7fae31d720b986c9606470a80766f31cf690a Mon Sep 17 00:00:00 2001 From: Tyfon <29051038+tyfon7@users.noreply.github.com> Date: Sat, 22 Jun 2024 11:36:18 -0700 Subject: [PATCH] fix corner case where dragged item highlights red due to non-move --- Patches/MultiSelectPatches.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Patches/MultiSelectPatches.cs b/Patches/MultiSelectPatches.cs index 83d8ea4..cd1d5a7 100644 --- a/Patches/MultiSelectPatches.cs +++ b/Patches/MultiSelectPatches.cs @@ -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())