diff --git a/QuIDE/QuIDE.csproj b/QuIDE/QuIDE.csproj index 39e0c9e..9f36886 100644 --- a/QuIDE/QuIDE.csproj +++ b/QuIDE/QuIDE.csproj @@ -32,20 +32,20 @@ - + - - + + - - + + - - - + + + diff --git a/QuIDE/Views/Controls/CircuitGrid.axaml.cs b/QuIDE/Views/Controls/CircuitGrid.axaml.cs index 4f77e72..c83e537 100644 --- a/QuIDE/Views/Controls/CircuitGrid.axaml.cs +++ b/QuIDE/Views/Controls/CircuitGrid.axaml.cs @@ -1,11 +1,13 @@ #region using System; +using System.Runtime.InteropServices; using Avalonia; using Avalonia.Controls; using Avalonia.Controls.Shapes; using Avalonia.Input; using Avalonia.Media; +using QuIDE.CodeHelpers; using QuIDE.QuantumModel; using QuIDE.ViewModels; using QuIDE.ViewModels.Controls; @@ -93,7 +95,16 @@ private void GateButton_MouseDown(object sender, PointerPressedEventArgs e) var dragData = new DataObject(); dragData.Set(typeof(Tuple).ToString(), data); - DragDrop.DoDragDrop(e, dragData, DragDropEffects.Link); + try + { + DragDrop.DoDragDrop(e, dragData,DragDropEffects.Link); + } + catch (COMException exception) + { + var msg = exception.Message; + Console.WriteLine(exception); + // SimpleDialogHandler.ShowSimpleMessage(msg); + } } private void ctrlPoint_Drop(object sender, PointerEventArgs pointerEventArgs)