From 2d9472d179ecff85b7eb74c70c5c4b2e8410566a Mon Sep 17 00:00:00 2001 From: Roy Qu Date: Sat, 8 Jan 2022 10:48:26 +0800 Subject: [PATCH] fix: when drop project file to an empty folder, an additional blank row is displayed in that folder --- RedPandaIDE/mainwindow.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/RedPandaIDE/mainwindow.cpp b/RedPandaIDE/mainwindow.cpp index 96cea15d..c56d9121 100644 --- a/RedPandaIDE/mainwindow.cpp +++ b/RedPandaIDE/mainwindow.cpp @@ -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