diff --git a/qbolt/mainwindow.cpp b/qbolt/mainwindow.cpp index 7faa026..1c928f5 100644 --- a/qbolt/mainwindow.cpp +++ b/qbolt/mainwindow.cpp @@ -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()