From 61d43e8e72ee9eadd731e2851ea75d27c343940d Mon Sep 17 00:00:00 2001 From: thunder2 Date: Thu, 20 Jun 2013 12:27:51 +0000 Subject: [PATCH] Disabled refill of FriendSelectionWidget after group changed when no groups are shown. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6444 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- .../src/gui/common/FriendSelectionWidget.cpp | 10 +++++++++- retroshare-gui/src/gui/common/FriendSelectionWidget.h | 3 ++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/retroshare-gui/src/gui/common/FriendSelectionWidget.cpp b/retroshare-gui/src/gui/common/FriendSelectionWidget.cpp index 9c2287b3a..061b7e08a 100644 --- a/retroshare-gui/src/gui/common/FriendSelectionWidget.cpp +++ b/retroshare-gui/src/gui/common/FriendSelectionWidget.cpp @@ -94,7 +94,7 @@ FriendSelectionWidget::FriendSelectionWidget(QWidget *parent) : connect(ui->deselectAll_PB, SIGNAL(clicked()), this, SLOT(deselectAll())); connect(ui->filterLineEdit, SIGNAL(textChanged(QString)), this, SLOT(filterItems(QString))); - connect(NotifyQt::getInstance(), SIGNAL(groupsChanged(int)), this, SLOT(fillList())); + connect(NotifyQt::getInstance(), SIGNAL(groupsChanged(int)), this, SLOT(groupsChanged(int))); connect(NotifyQt::getInstance(), SIGNAL(peerStatusChanged(const QString&,int)), this, SLOT(peerStatusChanged(const QString&,int))); mCompareRole = new RSTreeWidgetItemCompareRole; @@ -489,6 +489,13 @@ void FriendSelectionWidget::secured_fillList() emit contentChanged(); } +void FriendSelectionWidget::groupsChanged(int /*type*/) +{ + if (mShowTypes & SHOW_GROUP) { + fillList(); + } +} + void FriendSelectionWidget::peerStatusChanged(const QString& peerId, int status) { if(!isVisible()) @@ -826,6 +833,7 @@ void FriendSelectionWidget::deselectAll() for(QTreeWidgetItemIterator itemIterator(ui->friendList);*itemIterator!=NULL;++itemIterator) setSelected(mListModus, *itemIterator, false); } + void FriendSelectionWidget::selectAll() { for(QTreeWidgetItemIterator itemIterator(ui->friendList);*itemIterator!=NULL;++itemIterator) diff --git a/retroshare-gui/src/gui/common/FriendSelectionWidget.h b/retroshare-gui/src/gui/common/FriendSelectionWidget.h index ea58c2bb5..bf35dfd45 100644 --- a/retroshare-gui/src/gui/common/FriendSelectionWidget.h +++ b/retroshare-gui/src/gui/common/FriendSelectionWidget.h @@ -105,7 +105,7 @@ signals: void itemChanged(int idType, const QString &id, QTreeWidgetItem *item, int column); private slots: - void fillList(); + void groupsChanged(int type); void peerStatusChanged(const QString& peerId, int status); void filterItems(const QString &text); void contextMenuRequested(const QPoint &pos); @@ -115,6 +115,7 @@ private slots: void deselectAll() ; private: + void fillList(); void secured_fillList(); bool filterItem(QTreeWidgetItem *item, const QString &text);