Text::_setCaptionHorizontal bug


21-01-2008 15:46:06

I found a bug in Text::_setCaptionHorizontal which leads to a lot of crashes in my project (another past-the-end-iteration problem).

Here is a quick patch, which fixes the crashes:


It could use some more testing, especially regarding multi-line text display.

P.S.: The patch contains some lines, which only remove spaces or tabs from empty lines or the end of a line. This is pretty inconvenient. Could we agree upon configuring our editors to remove this stuff automatically, when working on QuickGUI?


21-01-2008 17:35:43

Thanks for the patch. Why is it that we need to remove spaces or tabs at the end of lines? Imagine the scenario where you have a text box or label area in a window, and you can resize the window. We would be adding and removing the whitespace quads at runtime, which can get complex.


21-01-2008 19:07:30

No, I mean in the source code. My editor is doing that automatically. So even if I barely change a file, tons of changes are produced, each only removing a few spaces.


21-01-2008 20:44:27

Ah. I don't know how to tell Visual Studio to remove all trailing spaces/tabs, but I'll see what google gives me.


22-01-2008 04:05:44

I couldn't find how to remove trailing whitespace, but it wasn't much of a burden for me.

I applied the patch, but I'm not at a point where I can commit. I will be in the next commit.