diff --git a/BizHawk.Client.EmuHawk/CustomControls/InputRoll/InputRoll.Drawing.cs b/BizHawk.Client.EmuHawk/CustomControls/InputRoll/InputRoll.Drawing.cs index ba16b89f99..8ecebcf382 100644 --- a/BizHawk.Client.EmuHawk/CustomControls/InputRoll/InputRoll.Drawing.cs +++ b/BizHawk.Client.EmuHawk/CustomControls/InputRoll/InputRoll.Drawing.cs @@ -30,7 +30,8 @@ namespace BizHawk.Client.EmuHawk var lastVisibleRow = firstVisibleRow + CalcVisibleRows(e.ClipRectangle); CalculateHorizontalColumnPositions(visibleColumns); - if (visibleColumns.Any()) + var needsColumnRedraw = HorizontalOrientation || e.ClipRectangle.Y < ColumnHeight; + if (visibleColumns.Any() && needsColumnRedraw) { DrawColumnBg(visibleColumns); DrawColumnText(visibleColumns); diff --git a/BizHawk.Client.EmuHawk/CustomControls/InputRoll/InputRoll.cs b/BizHawk.Client.EmuHawk/CustomControls/InputRoll/InputRoll.cs index 781dd2c585..dc56a21669 100644 --- a/BizHawk.Client.EmuHawk/CustomControls/InputRoll/InputRoll.cs +++ b/BizHawk.Client.EmuHawk/CustomControls/InputRoll/InputRoll.cs @@ -271,24 +271,28 @@ namespace BizHawk.Client.EmuHawk // Similarly to ListView in virtual mode, we want to always refresh // when setting row count, that gives the calling code assurance that // redraw will happen - - // TODO: horizontal orientation - if (HorizontalOrientation) - { - Refresh(); - } - else - { - int x = _hBar.Value; - int y = ColumnHeight; + Redraw(); + } + } - int w = VisibleColumns.Any() - ? Math.Min(VisibleColumns.Max(c => c.Right) - _hBar.Value, Width) - : 0; + public void Redraw() + { + // TODO: horizontal orientation + if (HorizontalOrientation) + { + Refresh(); + } + else + { + int x = _hBar.Value; + int y = ColumnHeight + 1; - int h = Height - y; - Invalidate(new Rectangle(x, y, w, h)); - } + int w = VisibleColumns.Any() + ? Math.Min(VisibleColumns.Max(c => c.Right) - _hBar.Value, Width) + : 0; + + int h = Height - y; + Invalidate(new Rectangle(x, y, w, h)); } }