From a45b19364d27ef2b316cd0df07d45c7543668b48 Mon Sep 17 00:00:00 2001 From: Kaphotics Date: Sun, 21 Aug 2016 09:07:44 -0700 Subject: [PATCH] Tweak dragdrop to computer When the dragdrop succeeds to a location outside the program, the effect is Move. When the dragdrop succeeds to another slot, the effect is Link. When the dragdrop succeeds to Tabs, the effect is Copy. When the dragdrop fails, the effect is None. --- PKHeX/MainWindow/Main.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/PKHeX/MainWindow/Main.cs b/PKHeX/MainWindow/Main.cs index a0c968548..4071e375d 100644 --- a/PKHeX/MainWindow/Main.cs +++ b/PKHeX/MainWindow/Main.cs @@ -3363,7 +3363,7 @@ private void pbBoxSlot_MouseMove(object sender, MouseEventArgs e) pb.BackColor = Color.FromArgb(100, 200, 200, 200); // Thread Blocks on DoDragDrop DragDropEffects result = pb.DoDragDrop(new DataObject(DataFormats.FileDrop, new[] { newfile }), DragDropEffects.Move); - if (result == DragDropEffects.None || result == DragDropEffects.Copy) // not dropped to another box slot, restore img + if (result != DragDropEffects.Link) // not dropped to another box slot, restore img pb.Image = img; if (result == DragDropEffects.Copy) // viewed in tabs, apply 'view' highlight getSlotColor(slotSourceSlotNumber, Properties.Resources.slotView); @@ -3458,6 +3458,7 @@ private void pbBoxSlot_DragDrop(object sender, DragEventArgs e) SAV.setStoredSlot(pkz, slotDestinationOffset); getQuickFiller(SlotPictureBoxes[slotDestinationSlotNumber], pkz); + e.Effect = DragDropEffects.Link; slotSourceOffset = 0; // Clear offset value } }