From 3d42cdf6c32308c07088d7731f55cb96f3bc0a5e Mon Sep 17 00:00:00 2001 From: Roy Qu Date: Sat, 23 Jul 2022 15:41:19 +0800 Subject: [PATCH] - fix: can't create folder in files view, if nothing is selected --- NEWS.md | 1 + RedPandaIDE/mainwindow.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/NEWS.md b/NEWS.md index f82b7072..a2d86771 100644 --- a/NEWS.md +++ b/NEWS.md @@ -12,6 +12,7 @@ Red Panda C++ Version 1.1.5 - fix: "Timeout for problem case" can't be rechecked, in the Settings Dialog -> executor -> problem set panel. - fix: bug in the project template - change: sort local identifiers before keywords in the auto completion popup + - fix: can't create folder in files view, if nothing is selected Red Panda C++ Version 1.1.4 diff --git a/RedPandaIDE/mainwindow.cpp b/RedPandaIDE/mainwindow.cpp index d00e6d72..2b40d058 100644 --- a/RedPandaIDE/mainwindow.cpp +++ b/RedPandaIDE/mainwindow.cpp @@ -3555,6 +3555,7 @@ void MainWindow::onFilesViewCreateFolder() ui->treeFiles->expand(index); } else { dir = mFileSystemModel.rootDirectory(); + parentIndex=mFileSystemModel.index(dir.absolutePath()); } QString folderName = tr("New Folder"); int count = 0;