diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-03-23 02:37:16 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-03-23 02:37:16 +0300 |
commit | 3990da1660d71fc93392aab3bac3cd6b7f01cced (patch) | |
tree | c30dfc7f7215278b52cd54184044df24c58d77b4 /src/gui/widgets/browserbox.cpp | |
parent | 4fc62da8cdd2d9bae92c5844aa096599f9906e38 (diff) | |
download | manaverse-3990da1660d71fc93392aab3bac3cd6b7f01cced.tar.gz manaverse-3990da1660d71fc93392aab3bac3cd6b7f01cced.tar.bz2 manaverse-3990da1660d71fc93392aab3bac3cd6b7f01cced.tar.xz manaverse-3990da1660d71fc93392aab3bac3cd6b7f01cced.zip |
Fix copy to clipboard issue.
Diffstat (limited to 'src/gui/widgets/browserbox.cpp')
-rw-r--r-- | src/gui/widgets/browserbox.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/gui/widgets/browserbox.cpp b/src/gui/widgets/browserbox.cpp index b837b1eaf..d5b088369 100644 --- a/src/gui/widgets/browserbox.cpp +++ b/src/gui/widgets/browserbox.cpp @@ -659,6 +659,8 @@ std::string BrowserBox::getTextAtPos(const int x, const int y) std::string str = ""; + int lastY = 0; + for (LinePartIterator i = mLineParts.begin(); i != mLineParts.end(); ++i) @@ -668,7 +670,16 @@ std::string BrowserBox::getTextAtPos(const int x, const int y) continue; if (part.mY > textY) break; - str += part.mText; + + if (part.mY > lastY) + { + str = part.mText; + lastY = part.mY; + } + else + { + str += part.mText; + } } return str; |