From e7793132e8fc1549bb7781b43dbee840211224e6 Mon Sep 17 00:00:00 2001 From: Emmanuel Pescosta Date: Sat, 18 Aug 2012 15:11:53 +0200 Subject: [PATCH] Select the correct item in places-panel, when a directory is opened. BUG: 304541 REVIEW: 106074 FIXED-IN: 4.9.1 (cherry picked from commit 1ec8de2c619006e3fe997fbf6074035d65dea6c5) --- src/panels/places/placespanel.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/panels/places/placespanel.cpp b/src/panels/places/placespanel.cpp index 429c5399a8..d4450888e0 100644 --- a/src/panels/places/placespanel.cpp +++ b/src/panels/places/placespanel.cpp @@ -62,6 +62,16 @@ PlacesPanel::~PlacesPanel() bool PlacesPanel::urlChanged() { + if (!url().isValid() || url().protocol().contains("search")) { + // Skip results shown by a search, as possible identical + // directory names are useless without parent-path information. + return false; + } + + if (m_controller) { + selectClosestItem(); + } + return true; }