Fix bug when removing root item in RsCollectionDialog

This commit is contained in:
Phenom 2018-02-18 08:53:31 +01:00
parent 63ddccd2ca
commit 6d0945fbab

View File

@ -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();
if (parent) {
parent->removeChild(item);
} else {
getRootItem()->removeChild(item);
}
return true;
} else {
if (!removeOnlyFile) {