Skip to content

Commit 8051d4d

Browse files
Fix #3482: Drag and Drop is no longer working in the Assemblies tree view.
1 parent a18d0d4 commit 8051d4d

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

ICSharpCode.ILSpyX/TreeView/PlatformAbstractions/IPlatformDataObject.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ public interface IPlatformDataObject
44
{
55
bool GetDataPresent(string format);
66
object GetData(string format);
7-
87
void SetData(string format, object data);
8+
object UnderlyingDataObject { get; }
99
}
1010
}

ICSharpCode.ILSpyX/TreeView/PlatformAbstractions/IPlatformDragDrop.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
{
33
public interface IPlatformDragDrop
44
{
5-
XPlatDragDropEffects DoDragDrop(object dragSource, object data, XPlatDragDropEffects allowedEffects);
5+
XPlatDragDropEffects DoDragDrop(object dragSource, IPlatformDataObject data, XPlatDragDropEffects allowedEffects);
66
}
77
}

ILSpy/Controls/TreeView/WpfWindowsDataObject.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
namespace ICSharpCode.ILSpy.Controls.TreeView
66
{
7-
public class WpfWindowsDataObject : IPlatformDataObject
7+
public sealed class WpfWindowsDataObject : IPlatformDataObject
88
{
99
private readonly IDataObject _dataObject;
1010

@@ -27,5 +27,7 @@ public void SetData(string format, object data)
2727
{
2828
_dataObject.SetData(format, data);
2929
}
30+
31+
object IPlatformDataObject.UnderlyingDataObject => _dataObject;
3032
}
3133
}

ILSpy/Controls/TreeView/WpfWindowsDragDropManager.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ namespace ICSharpCode.ILSpy.Controls.TreeView
66
{
77
public class WpfWindowsDragDropManager : IPlatformDragDrop
88
{
9-
public XPlatDragDropEffects DoDragDrop(object dragSource, object data, XPlatDragDropEffects allowedEffects)
9+
public XPlatDragDropEffects DoDragDrop(object dragSource, IPlatformDataObject data, XPlatDragDropEffects allowedEffects)
1010
{
11-
return (XPlatDragDropEffects)DragDrop.DoDragDrop(dragSource as DependencyObject, data, (DragDropEffects)allowedEffects);
11+
return (XPlatDragDropEffects)DragDrop.DoDragDrop(dragSource as DependencyObject, data.UnderlyingDataObject, (DragDropEffects)allowedEffects);
1212
}
1313
}
1414
}

0 commit comments

Comments
 (0)