- fix: Remove multiple files in the project panel is not correctly handled.
This commit is contained in:
parent
919ba31c32
commit
d7293b48fc
1
NEWS.md
1
NEWS.md
|
@ -8,6 +8,7 @@ Red Panda C++ Version 2.19
|
||||||
- enhancement: Drag the selection beyond the end of the document, and move/copy it beyond the last line.
|
- enhancement: Drag the selection beyond the end of the document, and move/copy it beyond the last line.
|
||||||
- enhancement: Open Containing folder will auto select the file in windows file explore.
|
- enhancement: Open Containing folder will auto select the file in windows file explore.
|
||||||
- fix: Class constructor & destructor is not correctly handled.
|
- fix: Class constructor & destructor is not correctly handled.
|
||||||
|
- fix: Remove multiple files in the project panel is not correctly handled.
|
||||||
|
|
||||||
Red Panda C++ Version 2.18
|
Red Panda C++ Version 2.18
|
||||||
|
|
||||||
|
|
|
@ -7006,6 +7006,7 @@ void MainWindow::on_actionRemove_from_project_triggered()
|
||||||
tr("Remove the file from disk?"),
|
tr("Remove the file from disk?"),
|
||||||
QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes);
|
QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes);
|
||||||
|
|
||||||
|
QList<PProjectUnit> units;
|
||||||
foreach (const QModelIndex& index, ui->projectView->selectionModel()->selectedIndexes()){
|
foreach (const QModelIndex& index, ui->projectView->selectionModel()->selectedIndexes()){
|
||||||
if (!index.isValid())
|
if (!index.isValid())
|
||||||
continue;
|
continue;
|
||||||
|
@ -7015,8 +7016,11 @@ void MainWindow::on_actionRemove_from_project_triggered()
|
||||||
if (!folderNode)
|
if (!folderNode)
|
||||||
continue;
|
continue;
|
||||||
PProjectUnit unit = folderNode->pUnit.lock();
|
PProjectUnit unit = folderNode->pUnit.lock();
|
||||||
|
units.append(unit);
|
||||||
|
}
|
||||||
|
for(PProjectUnit& unit: units) {
|
||||||
mProject->removeUnit(unit, true, removeFile);
|
mProject->removeUnit(unit, true, removeFile);
|
||||||
};
|
}
|
||||||
mClassBrowserModel.beginUpdate();
|
mClassBrowserModel.beginUpdate();
|
||||||
mClassBrowserModel.endUpdate();
|
mClassBrowserModel.endUpdate();
|
||||||
ui->projectView->selectionModel()->clearSelection();
|
ui->projectView->selectionModel()->clearSelection();
|
||||||
|
|
Loading…
Reference in New Issue