- fix: create file in the files view should auto scroll to the new created file
This commit is contained in:
parent
8cbcbb4b98
commit
55126ebebe
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue