Browse Source

Fix #3482: Drag and Drop is no longer working in the Assemblies tree view.

pull/3487/head
Siegfried Pammer 6 days ago
parent
commit
8051d4d071
  1. 2
      ICSharpCode.ILSpyX/TreeView/PlatformAbstractions/IPlatformDataObject.cs
  2. 2
      ICSharpCode.ILSpyX/TreeView/PlatformAbstractions/IPlatformDragDrop.cs
  3. 4
      ILSpy/Controls/TreeView/WpfWindowsDataObject.cs
  4. 4
      ILSpy/Controls/TreeView/WpfWindowsDragDropManager.cs

2
ICSharpCode.ILSpyX/TreeView/PlatformAbstractions/IPlatformDataObject.cs

@ -4,7 +4,7 @@
{
bool GetDataPresent(string format);
object GetData(string format);
void SetData(string format, object data);
object UnderlyingDataObject { get; }
}
}

2
ICSharpCode.ILSpyX/TreeView/PlatformAbstractions/IPlatformDragDrop.cs

@ -2,6 +2,6 @@
{
public interface IPlatformDragDrop
{
XPlatDragDropEffects DoDragDrop(object dragSource, object data, XPlatDragDropEffects allowedEffects);
XPlatDragDropEffects DoDragDrop(object dragSource, IPlatformDataObject data, XPlatDragDropEffects allowedEffects);
}
}

4
ILSpy/Controls/TreeView/WpfWindowsDataObject.cs

@ -4,7 +4,7 @@ using ICSharpCode.ILSpyX.TreeView.PlatformAbstractions;
namespace ICSharpCode.ILSpy.Controls.TreeView
{
public class WpfWindowsDataObject : IPlatformDataObject
public sealed class WpfWindowsDataObject : IPlatformDataObject
{
private readonly IDataObject _dataObject;
@ -27,5 +27,7 @@ namespace ICSharpCode.ILSpy.Controls.TreeView
{
_dataObject.SetData(format, data);
}
object IPlatformDataObject.UnderlyingDataObject => _dataObject;
}
}

4
ILSpy/Controls/TreeView/WpfWindowsDragDropManager.cs

@ -6,9 +6,9 @@ namespace ICSharpCode.ILSpy.Controls.TreeView
{
public class WpfWindowsDragDropManager : IPlatformDragDrop
{
public XPlatDragDropEffects DoDragDrop(object dragSource, object data, XPlatDragDropEffects allowedEffects)
public XPlatDragDropEffects DoDragDrop(object dragSource, IPlatformDataObject data, XPlatDragDropEffects allowedEffects)
{
return (XPlatDragDropEffects)DragDrop.DoDragDrop(dragSource as DependencyObject, data, (DragDropEffects)allowedEffects);
return (XPlatDragDropEffects)DragDrop.DoDragDrop(dragSource as DependencyObject, data.UnderlyingDataObject, (DragDropEffects)allowedEffects);
}
}
}
Loading…
Cancel
Save