Skip to content

Commit

Permalink
updated pkgs and alleviated app crash on windows when creating mcx gate
Browse files Browse the repository at this point in the history
  • Loading branch information
marc2911 authored and linderd committed Jun 23, 2024
1 parent 9f1244c commit 3a73f8f
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 9 deletions.
16 changes: 8 additions & 8 deletions QuIDE/QuIDE.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -32,20 +32,20 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Avalonia" Version="11.0.9" />
<PackageReference Include="Avalonia" Version="11.0.10" />
<PackageReference Include="Avalonia.AvaloniaEdit" Version="11.0.6" />
<PackageReference Include="Avalonia.Controls.DataGrid" Version="11.0.9" />
<PackageReference Include="Avalonia.Desktop" Version="11.0.9" />
<PackageReference Include="Avalonia.Controls.DataGrid" Version="11.0.10" />
<PackageReference Include="Avalonia.Desktop" Version="11.0.10" />
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.0.9" />
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.0.9" />
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.0.10" />
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.0.10" />
<PackageReference Include="AvaloniaEdit.TextMate" Version="11.0.6" />
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.2.2" />
<PackageReference Include="DotNet.Bundle" Version="0.9.13" />
<PackageReference Include="MessageBox.Avalonia" Version="3.1.5.1" />
<PackageReference Include="Microsoft.CodeAnalysis.Common" Version="4.8.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.8.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Scripting" Version="4.8.0" />
<PackageReference Include="Microsoft.CodeAnalysis.Common" Version="4.10.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.10.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Scripting" Version="4.10.0" />
</ItemGroup>

<ItemGroup>
Expand Down
13 changes: 12 additions & 1 deletion QuIDE/Views/Controls/CircuitGrid.axaml.cs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -93,7 +95,16 @@ private void GateButton_MouseDown(object sender, PointerPressedEventArgs e)
var dragData = new DataObject();
dragData.Set(typeof(Tuple<int, RegisterRefModel>).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)
Expand Down

0 comments on commit 3a73f8f

Please sign in to comment.