Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/PlanViewer.App/Controls/QuerySessionControl.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
using System.Xml.Linq;
using Avalonia.Controls;
using Avalonia.Input;
using Avalonia.Input.Platform;
using Avalonia.Interactivity;
using Avalonia.Layout;
using Avalonia.Media;
Expand Down Expand Up @@ -120,7 +121,7 @@ private void SetupEditorContextMenu()
{
var clipboard = TopLevel.GetTopLevel(this)?.Clipboard;
if (clipboard == null) return;
var text = await clipboard.GetTextAsync();
var text = await clipboard.TryGetTextAsync();
if (string.IsNullOrEmpty(text)) return;
QueryEditor.TextArea.PerformTextInput(text);
};
Expand Down
3 changes: 2 additions & 1 deletion src/PlanViewer.App/MainWindow.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
using System.Xml.Linq;
using Avalonia.Controls;
using Avalonia.Input;
using Avalonia.Input.Platform;
using Avalonia.Interactivity;
using Avalonia.Layout;
using Avalonia.Media;
Expand Down Expand Up @@ -370,7 +371,7 @@ private async Task PasteXmlAsync()
var clipboard = this.Clipboard;
if (clipboard == null) return;

var xml = await clipboard.GetTextAsync();
var xml = await clipboard.TryGetTextAsync();
if (string.IsNullOrWhiteSpace(xml))
{
ShowError("The clipboard does not contain any text.");
Expand Down
Loading