Skip to content

Commit

Permalink
show full path in tooltip for Files > Location
Browse files Browse the repository at this point in the history
  • Loading branch information
ddennedy committed Jan 11, 2025
1 parent e718efa commit 6b7de9b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/docks/filesdock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -550,6 +550,7 @@ FilesDock::FilesDock(QWidget *parent)
m_filesModel->setFilter(QDir::Dirs | QDir::Files | QDir::NoDotAndDotDot);
m_filesModel->setReadOnly(true);
m_filesModel->setRootPath(Settings.filesCurrentDir());
ui->locationsCombo->setToolTip(Settings.filesCurrentDir());
m_filesProxyModel = new FilesProxyModel(this);
m_filesProxyModel->setFilterCaseSensitivity(Qt::CaseInsensitive);
m_filesProxyModel->setSourceModel(m_filesModel);
Expand Down Expand Up @@ -1097,6 +1098,7 @@ void FilesDock::changeDirectory(const QString &filePath, bool resetLocations)
ui->treeView->setCurrentIndex(index);
index = m_filesModel->setRootPath(path);
Settings.setFilesCurrentDir(path);
ui->locationsCombo->setToolTip(path);
m_view->setRootIndex(m_filesProxyModel->mapFromSource(index));
m_iconsView->updateSizes();
if (resetLocations)
Expand All @@ -1118,6 +1120,7 @@ void FilesDock::changeFilesDirectory(const QModelIndex &index)
m_iconsView->updateSizes();
auto path = QDir::toNativeSeparators(m_filesModel->rootPath());
ui->locationsCombo->setCurrentText(path);
ui->locationsCombo->setToolTip(path);
m_view->scrollToTop();
clearStatus();
}
Expand Down

0 comments on commit 6b7de9b

Please sign in to comment.