mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-31 03:45:10 -04:00
Fix bug when removing root item in RsCollectionDialog
This commit is contained in:
parent
63ddccd2ca
commit
6d0945fbab
1 changed files with 5 additions and 1 deletions
|
@ -980,7 +980,11 @@ bool RsCollectionDialog::removeItem(QTreeWidgetItem *item, bool &removeOnlyFile)
|
|||
//First uncheck item to update parent informations
|
||||
item->setCheckState(COLUMN_FILE,Qt::Unchecked);
|
||||
QTreeWidgetItem *parent = item->parent();
|
||||
parent->removeChild(item);
|
||||
if (parent) {
|
||||
parent->removeChild(item);
|
||||
} else {
|
||||
getRootItem()->removeChild(item);
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
if (!removeOnlyFile) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue