From 8b0e32ab5f6259129dc3c1ab3dad20c37c684db3 Mon Sep 17 00:00:00 2001 From: Bas Pape Date: Tue, 27 Aug 2013 21:59:37 +0200 Subject: [PATCH] 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 --- src/qtui/topicwidget.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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); } -- 2.20.1