diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-03-27 02:10:26 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-03-27 02:10:26 +0300 |
commit | 6059f17f7a03d62c2875c921d501587dbc2253c7 (patch) | |
tree | 0fbca0887d7f64b6488182e3109087d5ea8c0ede /src/gui/widgets/browserbox.cpp | |
parent | a65c9ec055e51bdff5e10334c9e692411e69fb3e (diff) | |
download | mv-6059f17f7a03d62c2875c921d501587dbc2253c7.tar.gz mv-6059f17f7a03d62c2875c921d501587dbc2253c7.tar.bz2 mv-6059f17f7a03d62c2875c921d501587dbc2253c7.tar.xz mv-6059f17f7a03d62c2875c921d501587dbc2253c7.zip |
Fix chat links again.
Diffstat (limited to 'src/gui/widgets/browserbox.cpp')
-rw-r--r-- | src/gui/widgets/browserbox.cpp | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/src/gui/widgets/browserbox.cpp b/src/gui/widgets/browserbox.cpp index 8e8d4f2c2..5ef7adfcd 100644 --- a/src/gui/widgets/browserbox.cpp +++ b/src/gui/widgets/browserbox.cpp @@ -175,12 +175,30 @@ void BrowserBox::addRow(const std::string &row, bool atTop) while (mTextRows.size() > mMaxRows) { mTextRows.pop_front(); + + int yStart = 0; + + LinePartIterator i = mLineParts.begin(); + if (i != mLineParts.end()) + { + ++ i; + for (; i != mLineParts.end(); ++ i) + { + const LinePart &part = *i; + if (!part.mX) + { + yStart = part.mY; + break; + } + } + } + LinkIterator it = mLinks.begin(); LinkIterator it_end = mLinks.end(); while (it != it_end) { - (*it).y1 -= font->getHeight(); - (*it).y2 -= font->getHeight(); + (*it).y1 -= yStart; + (*it).y2 -= yStart; if ((*it).y1 < 0) it = mLinks.erase(it); |