fix: when drop project file to an empty folder, an additional blank row is displayed in that folder

This commit is contained in:
Roy Qu 2022-01-08 10:48:26 +08:00
parent 96f8804edd
commit 2d9472d179
1 changed files with 4 additions and 0 deletions

View File

@ -3475,6 +3475,10 @@ void MainWindow::updateProjectView()
mProjectProxyModel->sort(0);
connect(mProject->model(), &ProjectModel::dataChanged,
this, &MainWindow::invalidateProjectProxyModel);
connect(mProject->model(), &ProjectModel::rowsRemoved,
this, &MainWindow::invalidateProjectProxyModel);
connect(mProject->model(), &ProjectModel::rowsInserted,
this, &MainWindow::invalidateProjectProxyModel);
connect(mProject->model(), &QAbstractItemModel::modelReset,
ui->projectView,&QTreeView::expandAll);
} else