summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-03-21 01:35:52 +0300
committerAndrei Karas <akaras@inbox.ru>2012-04-01 21:18:44 +0300
commit296894d65a1a8e7d2b9aa0538e3e193b985c207d (patch)
tree7472dffd603cfe9bb4bfb455fa9aea0003408464
parent1172c72401d6478f1fecc28ebccf335a99a51faf (diff)
downloadplus-296894d65a1a8e7d2b9aa0538e3e193b985c207d.tar.gz
plus-296894d65a1a8e7d2b9aa0538e3e193b985c207d.tar.bz2
plus-296894d65a1a8e7d2b9aa0538e3e193b985c207d.tar.xz
plus-296894d65a1a8e7d2b9aa0538e3e193b985c207d.zip
Fix copy to clipboard with links.
-rw-r--r--src/gui/widgets/browserbox.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/gui/widgets/browserbox.cpp b/src/gui/widgets/browserbox.cpp
index 47c5616b6..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;