UI: Only allow right click to create a context menu if a game is selected.

This commit is contained in:
Evan Husted
2024-12-30 23:50:55 -06:00
parent bd29f658b1
commit 4135d74e4d
5 changed files with 65 additions and 24 deletions

View File

@@ -26,11 +26,5 @@ namespace Ryujinx.Ava.UI.Controls
if (sender is ListBox { SelectedItem: ApplicationData selected })
RaiseEvent(new ApplicationOpenedEventArgs(selected, ApplicationOpenedEvent));
}
public void GameList_SelectionChanged(object sender, SelectionChangedEventArgs args)
{
if (DataContext is MainWindowViewModel viewModel && sender is ListBox { SelectedItem: ApplicationData selected })
viewModel.GridSelectedApplication = selected;
}
}
}