Console: fix volume menu check-mark off-by-one (original 4.11.3 bug)

mnuVolume_DropDownOpening checked the item where i+1 == num/10, but the
items are index=level (rVolumeItems[0]="mute", [8]="80"), so the mark
sat one step below the reported volume and mute (0) never got a mark.
Set path was always correct — display only. Now checks i == num/10.

Faithful reproduction of a bug in the original decompiled console;
fixed here. Verified live: console reports 80 -> "80" checked, mute ->
"mute" checked, against vPOD. 106/106 diff tests unaffected.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Cyd
2026-07-11 22:06:37 -05:00
co-authored by Claude Fable 5
parent 106fa610c0
commit 85595b8c52
+5 -1
View File
@@ -1516,7 +1516,11 @@ internal class SitePanel : DockContent
for (int i = 0; i < rVolumeItems.Length; i++)
{
mnuVolume.DropDownItems.Add(rVolumeItems[i]);
((ToolStripMenuItem)mnuVolume.DropDownItems[i]).Checked = i + 1 == num / 10;
// Item i displays i*10 ("mute" at 0), so the reported level maps to
// index num/10 directly. The original console checked i+1 here — the
// mark sat one step below the actual volume, and mute (0) never got
// a mark at all. Original bug (4.11.3), fixed 2026-07-11.
((ToolStripMenuItem)mnuVolume.DropDownItems[i]).Checked = i == num / 10;
}
}