fix(util): pin operator precedence in DrawArrows IconButton id

`id + 1.ToString()` resolves as `id.ToString() + "1"`, producing "01"
instead of "1" for the ArrowRight button. The single live caller
(DbViewer page navigation) still produced unique IDs by accident, but
the semantics were wrong. Explicit parentheses fix it.
This commit is contained in:
2026-05-13 08:08:52 +02:00
parent c8ba8c1cd0
commit 3c33acf6d7
+3 -1
View File
@@ -583,7 +583,9 @@ internal static class ImGuiUtil
using (ImRaii.Disabled(isMax))
{
if (IconButton(FontAwesomeIcon.ArrowRight, id + 1.ToString()))
// Parentheses pin the operator precedence: without them this resolves as
// id.ToString() + "1" (e.g. "01" instead of "1").
if (IconButton(FontAwesomeIcon.ArrowRight, (id + 1).ToString()))
selected++;
}