From 9a8ffbe1d0b7209ac5ef7f1b9eb05326802af574 Mon Sep 17 00:00:00 2001 From: Emmanuel Pescosta Date: Sat, 18 Aug 2012 15:11:53 +0200 Subject: Select the correct item in places-panel, when a directory is opened. BUG: 304541 REVIEW: 106074 --- src/panels/places/placespanel.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src') diff --git a/src/panels/places/placespanel.cpp b/src/panels/places/placespanel.cpp index 429c5399a..d4450888e 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; } -- cgit v1.3