mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-13 00:19:30 -05:00
Fix bug when removing root item in RsCollectionDialog
This commit is contained in:
parent
63ddccd2ca
commit
6d0945fbab
@ -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…
Reference in New Issue
Block a user