mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Fixed GxsGroup TreeWidget's Context Menu by Phenom
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7387 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
f54162db76
commit
5e1099f47f
@ -300,6 +300,16 @@ QString GroupTreeWidget::itemId(QTreeWidgetItem *item)
|
||||
return item->data(COLUMN_DATA, ROLE_ID).toString();
|
||||
}
|
||||
|
||||
QString GroupTreeWidget::itemIdAt(QPoint &point)
|
||||
{
|
||||
QTreeWidgetItem *item = ui->treeWidget->itemAt(point);
|
||||
if (item == NULL) {
|
||||
return "";
|
||||
}
|
||||
|
||||
return item->data(COLUMN_DATA, ROLE_ID).toString();
|
||||
}
|
||||
|
||||
void GroupTreeWidget::fillGroupItems(QTreeWidgetItem *categoryItem, const QList<GroupItemInfo> &itemList)
|
||||
{
|
||||
if (categoryItem == NULL) {
|
||||
|
@ -83,6 +83,7 @@ public:
|
||||
QTreeWidgetItem *addCategoryItem(const QString &name, const QIcon &icon, bool expand);
|
||||
// Get id of item
|
||||
QString itemId(QTreeWidgetItem *item);
|
||||
QString itemIdAt(QPoint &point);
|
||||
// Fill items of a group
|
||||
void fillGroupItems(QTreeWidgetItem *categoryItem, const QList<GroupItemInfo> &itemList);
|
||||
// Set the unread count of an item
|
||||
|
@ -206,7 +206,7 @@ void GxsGroupFrameDialog::todo()
|
||||
|
||||
void GxsGroupFrameDialog::groupTreeCustomPopupMenu(QPoint point)
|
||||
{
|
||||
QString id = "" ;//ui->groupTreeWidget->itemIdAt(point);
|
||||
QString id = ui->groupTreeWidget->itemIdAt(point);
|
||||
if (id.isEmpty()) return;
|
||||
|
||||
mGroupId = RsGxsGroupId(id.toStdString());
|
||||
|
Loading…
Reference in New Issue
Block a user