From 5925aa06fed41e770630811dd4d5d021882b7ae7 Mon Sep 17 00:00:00 2001 From: chelovechishko Date: Mon, 2 Jul 2018 21:22:22 +0900 Subject: [PATCH] gui: anchor not only first word of nickname, if any --- .../src/gui/common/RSTextBrowser.cpp | 55 +++++++++++++++---- 1 file changed, 43 insertions(+), 12 deletions(-) diff --git a/retroshare-gui/src/gui/common/RSTextBrowser.cpp b/retroshare-gui/src/gui/common/RSTextBrowser.cpp index 03fbfe3de..8c59c815c 100644 --- a/retroshare-gui/src/gui/common/RSTextBrowser.cpp +++ b/retroshare-gui/src/gui/common/RSTextBrowser.cpp @@ -251,22 +251,53 @@ bool RSTextBrowser::checkImage(QPoint pos, QString &imageStr) */ QString RSTextBrowser::anchorForPosition(const QPoint &pos) const { + // Many calls when time label shows up QTextCursor cursor = cursorForPosition(pos); cursor.select(QTextCursor::WordUnderCursor); + QString word = cursor.selectedText(); QString anchor = ""; - if (!cursor.selectedText().isEmpty()){ - QRegExp rx("