- enhancement: replace Files View Panel's path lineedit control with combo box

This commit is contained in:
Roy Qu 2022-02-11 20:57:01 +08:00
parent 117352c526
commit e53e854c91
1 changed files with 3 additions and 1 deletions

View File

@ -5889,7 +5889,9 @@ void MainWindow::on_actionLocate_in_Files_View_triggered()
QString fileDir = extractFileDir(editor->filename());
if (!fileDir.isEmpty()) {
setFilesViewRoot(fileDir);
ui->treeFiles->setCurrentIndex(mFileSystemModel.index(editor->filename()));
QModelIndex index = mFileSystemModel.index(editor->filename());
ui->treeFiles->setCurrentIndex(index);
ui->treeFiles->scrollTo(index, QAbstractItemView::PositionAtCenter);
ui->tabInfos->setCurrentWidget(ui->tabFiles);
openCloseLeftPanel(true);
}