Skip to content

Commit

Permalink
fix Show in Files not updating File > Location
Browse files Browse the repository at this point in the history
  • Loading branch information
ddennedy committed Jan 22, 2025
1 parent 3116a70 commit 37c496b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions src/docks/filesdock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1087,7 +1087,7 @@ void FilesDock::onOpenActionTriggered()
}
}

void FilesDock::changeDirectory(const QString &filePath, bool resetLocations)
void FilesDock::changeDirectory(const QString &filePath)
{
LOG_DEBUG() << filePath;
QFileInfo info(filePath);
Expand All @@ -1099,10 +1099,10 @@ void FilesDock::changeDirectory(const QString &filePath, bool resetLocations)
index = m_filesModel->setRootPath(path);
Settings.setFilesCurrentDir(path);
ui->locationsCombo->setToolTip(path);
if (path != ui->locationsCombo->currentText())
ui->locationsCombo->setCurrentText(path);
m_view->setRootIndex(m_filesProxyModel->mapFromSource(index));
m_iconsView->updateSizes();
if (resetLocations)
ui->locationsCombo->setCurrentIndex(0);
if (info.isDir()) {
m_view->scrollToTop();
} else {
Expand Down Expand Up @@ -1311,7 +1311,7 @@ void FilesDock::onLocationsEditingFinished()
if (QLatin1String("/") == path)
path = QStringLiteral("C:/");
#endif
changeDirectory(path, false);
changeDirectory(path);
}

void FilesDock::on_locationsCombo_activated(int index)
Expand All @@ -1328,7 +1328,7 @@ void FilesDock::on_locationsCombo_activated(int index)
if (QLatin1String("/") == path)
path = QStringLiteral("C:/");
#endif
changeDirectory(path, false);
changeDirectory(path);
}

void FilesDock::on_addLocationButton_clicked()
Expand Down
4 changes: 2 additions & 2 deletions src/docks/filesdock.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2024 Meltytech, LLC
* Copyright (c) 2024-2025 Meltytech, LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -59,7 +59,7 @@ class FilesDock : public QDockWidget

public slots:
void onOpenActionTriggered();
void changeDirectory(const QString &path, bool resetLocations = true);
void changeDirectory(const QString &path);
void changeFilesDirectory(const QModelIndex &index);

private slots:
Expand Down

0 comments on commit 37c496b

Please sign in to comment.