mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-12 13:28:33 +00:00
Early return when copying isn't possible
This commit is contained in:
parent
4223879e72
commit
6a02d5031b
@ -16,13 +16,19 @@ public partial class DeviceLayoutTabView : ReactiveUserControl<DeviceLayoutTabVi
|
||||
|
||||
private void LayoutPathButton_OnClick(object? sender, RoutedEventArgs e)
|
||||
{
|
||||
TopLevel.GetTopLevel(this).Clipboard.SetTextAsync(ViewModel?.DefaultLayoutPath ?? string.Empty);
|
||||
if (ViewModel?.DefaultLayoutPath is null)
|
||||
return;
|
||||
|
||||
TopLevel.GetTopLevel(this).Clipboard.SetTextAsync(ViewModel.DefaultLayoutPath);
|
||||
ViewModel.ShowCopiedNotification();
|
||||
}
|
||||
|
||||
private void ImagePathButton_OnClick(object? sender, RoutedEventArgs e)
|
||||
{
|
||||
TopLevel.GetTopLevel(this).Clipboard.SetTextAsync(ViewModel?.Device?.Layout?.Image?.LocalPath ?? string.Empty);
|
||||
if (ViewModel?.Device?.Layout?.Image?.LocalPath is null)
|
||||
return;
|
||||
|
||||
TopLevel.GetTopLevel(this).Clipboard.SetTextAsync(ViewModel.Device.Layout.Image.LocalPath);
|
||||
ViewModel.ShowCopiedNotification();
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user