From 54005bb3bf5e344d56995a93da66c92a90bfecb8 Mon Sep 17 00:00:00 2001 From: Szymon Tomasz Stefanek Date: Thu, 10 Feb 2011 00:16:09 +0000 Subject: Another trick for the list git-svn-id: https://svn.kvirc.de/svn/trunk/kvirc@5449 17fca916-40b9-46aa-a4ea-0a15b648b75c --- src/modules/list/ListWindow.cpp | 4 +++- src/modules/list/ListWindow.h | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/modules/list/ListWindow.cpp b/src/modules/list/ListWindow.cpp index 11366c444..773f1bf22 100644 --- a/src/modules/list/ListWindow.cpp +++ b/src/modules/list/ListWindow.cpp @@ -133,7 +133,9 @@ QSize ChannelTreeWidgetItemDelegate::sizeHint( const QStyleOptionViewItem &sovIt case 2: default: //topic - return QSize(fm.width(KviMircCntrl::stripControlBytes(item->itemData()->m_szTopic)), iHeight); + if(item->itemData()->m_szStrippedTopic.isEmpty()) + item->itemData()->m_szStrippedTopic = KviMircCntrl::stripControlBytes(item->itemData()->m_szTopic); + return QSize(fm.width(item->itemData()->m_szStrippedTopic), iHeight); break; } //make gcc happy diff --git a/src/modules/list/ListWindow.h b/src/modules/list/ListWindow.h index 73c497a29..6decc0f8f 100644 --- a/src/modules/list/ListWindow.h +++ b/src/modules/list/ListWindow.h @@ -62,6 +62,7 @@ protected: QString m_szChan; QString m_szUsers; QString m_szTopic; + QString m_szStrippedTopic; }; class ChannelTreeWidgetItem : public QTreeWidgetItem -- cgit v1.3.1-10-gc9f91