select parent when deleting bucket (maybe fixes a crash?)

This commit is contained in:
mappu 2017-05-25 19:53:35 +12:00
parent 97467eae4d
commit 19ddb1c956

View File

@ -366,6 +366,8 @@ void MainWindow::on_actionDelete_bucket_triggered()
return;
}
QTreeWidgetItem* parent = itm->parent();
// One level down
browse.pop_back();
@ -379,9 +381,9 @@ void MainWindow::on_actionDelete_bucket_triggered()
}
// Refresh bucket list
refreshBucketTree(itm->parent()); // sub-tree only
ui->bucketTree->expandItem(itm->parent());
refreshBucketTree(parent); // sub-tree only
ui->bucketTree->expandItem(parent);
ui->bucketTree->setCurrentItem(parent);
}
void MainWindow::on_AddDataButton_clicked()