diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2006-01-21 20:31:33 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2006-01-21 20:31:33 +0000 |
commit | 5359640b6f271af31f6423df9d661433eff89a3e (patch) | |
tree | b96ecd2ddffe43b57fd1927cebd7ac1fe6baf5c5 /src | |
parent | 14d43383605281885ed576664594343d167e57f1 (diff) | |
download | mana-5359640b6f271af31f6423df9d661433eff89a3e.tar.gz mana-5359640b6f271af31f6423df9d661433eff89a3e.tar.bz2 mana-5359640b6f271af31f6423df9d661433eff89a3e.tar.xz mana-5359640b6f271af31f6423df9d661433eff89a3e.zip |
Small followup change.
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/browserbox.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gui/browserbox.cpp b/src/gui/browserbox.cpp index 9fab4f52..d34ce979 100644 --- a/src/gui/browserbox.cpp +++ b/src/gui/browserbox.cpp @@ -175,10 +175,11 @@ void BrowserBox::addRow(const std::string& row) if (mMode == AUTO_WRAP) { - unsigned int i, j, x = 0, y = 0; + unsigned int i, j, y = 0; unsigned int nextChar; char hyphen = '~'; int hyphenWidth = browserFont->getWidth(hyphen); + int x = 0; for (i = 0; i < mTextRows.size(); i++) { std::string row = mTextRows[i]; @@ -199,7 +200,7 @@ void BrowserBox::addRow(const std::string& row) row.substr(nextChar, (nextSpacePos - nextChar))); - if ((int)(x + nextWordWidth + 10) > getWidth()) + if ((x + nextWordWidth + 10) > getWidth()) { x = 15; // Ident in new line y += 1; @@ -207,7 +208,7 @@ void BrowserBox::addRow(const std::string& row) } } // Wrapping looong lines (brutal force) - else if ((int)(x + 2 * hyphenWidth) > getWidth()) + else if ((x + 2 * hyphenWidth) > getWidth()) { x = 15; // Ident in new line y += 1; |