hide no-op context menus for separators in ram watch

- closes #4051
This commit is contained in:
Morilli 2024-09-24 15:23:25 +02:00
parent e8b717c18e
commit 9f137753b9
1 changed files with 4 additions and 2 deletions

View File

@ -188,7 +188,7 @@ namespace BizHawk.Client.EmuHawk
private IEnumerable<Watch> SelectedSeparators => SelectedItems.Where(x => x.IsSeparator);
private bool MayPokeAllSelected
=> WatchListView.AnyRowsSelected && SelectedWatches.All(static w => w.Domain.Writable);
=> SelectedWatches.Any() && SelectedWatches.All(static w => w.Domain.Writable);
public IEnumerable<Watch> Watches => _watches.Where(x => !x.IsSeparator);
@ -1114,7 +1114,7 @@ namespace BizHawk.Client.EmuHawk
}
private bool MaySplitAllSelected
=> WatchListView.AnyRowsSelected && SelectedWatches.All(static w => w.IsSplittable);
=> SelectedWatches.Any() && SelectedWatches.All(static w => w.IsSplittable);
private void ListViewContextMenu_Opening(object sender, CancelEventArgs e)
{
@ -1141,6 +1141,8 @@ namespace BizHawk.Client.EmuHawk
= Debuggable?.MemoryCallbacksAvailable() is true
&& SelectedWatches.Any() && SelectedWatches.All(w => w.Domain.Name == sysBusName);
DuplicateContextMenuItem.Enabled = SelectedWatches.Any();
SplitContextMenuItem.Enabled = MaySplitAllSelected;
PokeContextMenuItem.Enabled =