From 3990da1660d71fc93392aab3bac3cd6b7f01cced Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 23 Mar 2012 02:37:16 +0300 Subject: Fix copy to clipboard issue. --- src/gui/widgets/browserbox.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src') 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; -- cgit v1.2.3-70-g09d2