From 96323e049c700fcd63d93f00c5b92a8ddfe0cb27 Mon Sep 17 00:00:00 2001 From: Serg Podtynnyi Date: Wed, 25 Jan 2023 00:04:54 +0700 Subject: Clear filter bar on clicking current folder in places Reset the filter bar when user clicks on the current folder in places list, also rename slot function to be more clear. BUG: 259382 --- src/dolphinviewcontainer.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/dolphinviewcontainer.cpp') diff --git a/src/dolphinviewcontainer.cpp b/src/dolphinviewcontainer.cpp index a38833481..10e886018 100644 --- a/src/dolphinviewcontainer.cpp +++ b/src/dolphinviewcontainer.cpp @@ -125,7 +125,7 @@ DolphinViewContainer::DolphinViewContainer(const QUrl& url, QWidget* parent) : // Initialize the main view m_view = new DolphinView(url, this); connect(m_view, &DolphinView::urlChanged, - m_filterBar, &FilterBar::slotUrlChanged); + m_filterBar, &FilterBar::clearIfUnlocked); connect(m_view, &DolphinView::urlChanged, m_messageWidget, &KMessageWidget::hide); // m_urlNavigator stays in sync with m_view's location changes and @@ -797,6 +797,11 @@ void DolphinViewContainer::closeFilterBar() Q_EMIT showFilterBarChanged(false); } +void DolphinViewContainer::clearFilterBar() +{ + m_filterBar->clearIfUnlocked(); +} + void DolphinViewContainer::setNameFilter(const QString& nameFilter) { m_view->hideToolTip(ToolTipManager::HideBehavior::Instantly); -- cgit v1.3