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:
@@ -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++;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user