From: Bas Pape Date: Tue, 27 Aug 2013 19:59:37 +0000 (+0200) Subject: Strip formatting when looking up the clickable. X-Git-Tag: 0.9.1~17 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=8b0e32ab5f6259129dc3c1ab3dad20c37c684db3 Strip formatting when looking up the clickable. In the TopicWidget the list of Clickables is initialized with text stripped of formatting, so when looking up their positions again, the formatting should be stripped as well. Fixes #1115 --- diff --git a/src/qtui/topicwidget.cpp b/src/qtui/topicwidget.cpp index 8b8e16d4..827452cc 100644 --- a/src/qtui/topicwidget.cpp +++ b/src/qtui/topicwidget.cpp @@ -24,6 +24,8 @@ #include "iconloader.h" #include "networkmodel.h" #include "uisettings.h" +#include "graphicalui.h" +#include "uistyle.h" TopicWidget::TopicWidget(QWidget *parent) : AbstractItemView(parent) @@ -191,7 +193,8 @@ void TopicWidget::updateResizeMode() void TopicWidget::clickableActivated(const Clickable &click) { NetworkId networkId = selectionModel()->currentIndex().data(NetworkModel::NetworkIdRole).value(); - click.activate(networkId, _topic); + UiStyle::StyledString sstr = GraphicalUi::uiStyle()->styleString(GraphicalUi::uiStyle()->mircToInternal(_topic), UiStyle::PlainMsg); + click.activate(networkId, sstr.plainText); }