diff --git a/RedPandaIDE/mainwindow.cpp b/RedPandaIDE/mainwindow.cpp index f3d881ad..12b37f87 100644 --- a/RedPandaIDE/mainwindow.cpp +++ b/RedPandaIDE/mainwindow.cpp @@ -3650,7 +3650,7 @@ void MainWindow::onFilesViewCreateFile() QFile file(dir.filePath(fileName)); file.open(QFile::NewOnly); QModelIndex newIndex = mFileSystemModel.index(fileName); - ui->treeFiles->selectionModel()->select(newIndex, QItemSelectionModel::SelectionFlag::Rows); + ui->treeFiles->setCurrentIndex(newIndex); }