From 73d1f4a7c977c98f3cb90b493b8c874ecf82ef09 Mon Sep 17 00:00:00 2001 From: "Aaron J. Seigo" Date: Sat, 27 Feb 2010 22:19:24 +0000 Subject: [PATCH] fix a regression with the link fix: we only want to go into text browser mode when text is selectable svn path=/branches/KDE/4.4/kdelibs/; revision=1096903 --- widgets/label.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/widgets/label.cpp b/widgets/label.cpp index 324bdbbde..10f46ca80 100644 --- a/widgets/label.cpp +++ b/widgets/label.cpp @@ -116,7 +116,6 @@ Label::Label(QGraphicsWidget *parent) QLabel *native = new QLabel; //disabled for now: triggers Qt bug 7254 //native->setWindowFlags(native->windowFlags()|Qt::BypassGraphicsProxyWidget); - native->setTextInteractionFlags(Qt::TextBrowserInteraction); d->textSelectable = false; connect(native, SIGNAL(linkActivated(QString)), this, SIGNAL(linkActivated(QString))); connect(native, SIGNAL(linkHovered(QString)), this, SIGNAL(linkHovered(QString))); @@ -191,6 +190,12 @@ bool Label::hasScaledContents() const void Label::setTextSelectable(bool enable) { + if (enable) { + native->setTextInteractionFlags(Qt::TextBrowserInteraction); + } else { + native->setTextInteractionFlags(Qt::LinksAccessibleByMouse); + } + d->textSelectable = enable; }