From e46a8a4286f3c7a94b298807ff5fd643163f91f9 Mon Sep 17 00:00:00 2001 From: adelikat Date: Fri, 29 Aug 2014 14:30:52 +0000 Subject: [PATCH] InputRoll - don't draw a string from the text callback, if it is empty --- BizHawk.Client.EmuHawk/tools/TAStudio/InputRoll.cs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/BizHawk.Client.EmuHawk/tools/TAStudio/InputRoll.cs b/BizHawk.Client.EmuHawk/tools/TAStudio/InputRoll.cs index 602c0b8d8a..309dbca1fe 100644 --- a/BizHawk.Client.EmuHawk/tools/TAStudio/InputRoll.cs +++ b/BizHawk.Client.EmuHawk/tools/TAStudio/InputRoll.cs @@ -532,7 +532,10 @@ namespace BizHawk.Client.EmuHawk int y = j * CellHeight; var point = new Point(x, y); QueryItemText(i + startIndex, j, out text); - Gdi.DrawString(text, point); + if (!string.IsNullOrWhiteSpace(text)) + { + Gdi.DrawString(text, point); + } } } } @@ -557,7 +560,11 @@ namespace BizHawk.Client.EmuHawk string text; var point = new Point(x + CellPadding, (i + 1) * CellHeight); // +1 accounts for the column header QueryItemText(i + startIndex, j, out text); - Gdi.DrawString(text, point); + if (!string.IsNullOrWhiteSpace(text)) + { + Gdi.DrawString(text, point); + } + x += CalcWidth(_columns[j]); } }