Linux - Fixed a couple small issues

This commit is contained in:
Diogo Trindade authored and RobertBeekman committed 2022-08-28 11:06:57 +02:00
1 parent 04ef4f0173
commit ddfdbee340
3 files changed
+20 -3

No files matched your search

@@ -287,6 +287,12 @@ public abstract class TreeItemViewModel : ActivatableViewModelBase
}
string[] formats = await Application.Current.Clipboard.GetFormatsAsync();
//diogotr7: This can be null on Linux sometimes. I'm not sure why.
if (formats == null)
{
CanPaste = false;
return;
}
CanPaste = formats.Contains(ProfileElementExtensions.ClipboardDataFormat);
}