From 4cc7c5aae4d5478dd4c2359edd9779a360e116a2 Mon Sep 17 00:00:00 2001 From: defnax Date: Sun, 3 Jan 2010 01:27:29 +0000 Subject: [PATCH] Added when no Thread selected clear Forum Name ,Post Text and Thread Title Added when switched Thread then clear last Post Text and Thread Title git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1968 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- retroshare-gui/src/gui/ForumsDialog.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/retroshare-gui/src/gui/ForumsDialog.cpp b/retroshare-gui/src/gui/ForumsDialog.cpp index e6ecb7828..552b73e64 100644 --- a/retroshare-gui/src/gui/ForumsDialog.cpp +++ b/retroshare-gui/src/gui/ForumsDialog.cpp @@ -571,6 +571,12 @@ void ForumsDialog::insertThreads() { /* not an actual forum - clear */ ui.threadTreeWidget->clear(); + /* when no Thread selected - clear */ + ui.forumName->clear(); + ui.threadTitle->clear(); + ui.postText->clear(); + /* clear last stored forumID */ + mCurrForumId = ""; std::cerr << "ForumsDialog::insertThreads() Current Thread Invalid" << std::endl; return; @@ -728,7 +734,6 @@ void ForumsDialog::insertThreads() rsForums->getForumMessage(fId,mit->msgId,msginfo) ; child->setText(1, QString::fromStdWString(mit->title)); - //child->setText(2, QString::fromStdString(msginfo.srcId)); child->setText(2, QString::fromStdString(rsPeers->getPeerName(msginfo.srcId))); child->setText(3, "signed"); child->setText(4, QString::fromStdString(mit->parentId)); @@ -751,6 +756,8 @@ void ForumsDialog::insertThreads() /* add all messages in! */ ui.threadTreeWidget->clear(); + ui.postText->clear(); + ui.threadTitle->clear(); ui.threadTreeWidget->insertTopLevelItems(0, items); }