]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphinviewcontainer.cpp
GIT_SILENT Sync po/docbooks with svn
[dolphin.git] / src / dolphinviewcontainer.cpp
index 66a9a116ac3cf487fe65aa74e3ab21f7d782b564..5b2a318d679f2e299b9a5c20166941aad7f61c68 100644 (file)
@@ -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.