From d6f916b4e6ab46fe6d9bd10e4c666ef803bceb85 Mon Sep 17 00:00:00 2001 From: Kurt Date: Sun, 22 Nov 2015 11:03:38 -0800 Subject: [PATCH] Tweak Drag&Drop Boxes now accept external files in addition to the existing slot swapping. --- PKX/f1-Main.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/PKX/f1-Main.cs b/PKX/f1-Main.cs index edfb11847..b59642fb8 100644 --- a/PKX/f1-Main.cs +++ b/PKX/f1-Main.cs @@ -61,8 +61,7 @@ public Main() foreach (PictureBox pb in PAN_Box.Controls) { pb.AllowDrop = true; - pb.DragDrop += tabMain_DragDrop; - pb.DragEnter += tabMain_DragEnter; + // The PictureBoxes have their own drag&drop event handlers. } foreach (TabPage tab in tabMain.TabPages) { @@ -3314,7 +3313,9 @@ private void pbBoxSlot_DragDrop(object sender, DragEventArgs e) } private void pbBoxSlot_DragEnter(object sender, DragEventArgs e) { - if (e.Data != null) + if (e.AllowedEffect == (DragDropEffects.Copy | DragDropEffects.Link)) // external file + e.Effect = DragDropEffects.Copy; + else if (e.Data != null) // within e.Effect = DragDropEffects.Move; } private byte[] pkm_from = (byte[])blankEK6.Clone();