X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/4cbeb81b2b8e2d37c93cda4d88787e08e0658291..4199e7ef20efdba287cbc189495b0c6329989a96:/src/dolphinviewcontainer.cpp diff --git a/src/dolphinviewcontainer.cpp b/src/dolphinviewcontainer.cpp index 66a9a116a..5b2a318d6 100644 --- a/src/dolphinviewcontainer.cpp +++ b/src/dolphinviewcontainer.cpp @@ -818,11 +818,13 @@ void DolphinViewContainer::slotUrlNavigatorLocationChanged(const QUrl &url) } if (KProtocolManager::supportsListing(url)) { - setSearchModeEnabled(isSearchUrl(url)); + const bool searchBoxInitialized = isSearchModeEnabled() && m_searchBox->text().isEmpty(); + setSearchModeEnabled(isSearchUrl(url) || searchBoxInitialized); + m_view->setUrl(url); tryRestoreViewState(); - if (m_autoGrabFocus && isActive() && !isSearchUrl(url)) { + if (m_autoGrabFocus && isActive() && !isSearchModeEnabled()) { // When an URL has been entered, the view should get the focus. // The focus must be requested asynchronously, as changing the URL might create // a new view widget.