From 899c171a2b62f0666dbe2ed755d51a8ae0f7ef9f Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Tue, 6 Dec 2011 18:49:12 +0100 Subject: [PATCH] Fix selection issue for Information Panel When the selection changes during the Information Panel is invisible, it still should get applied so that when making the Information Panel visible again a valid selection is shown. Thanks to A. Janardhan Reddy for the patch! (Additionally the obsolete check for an empty selection has been removed, as this cannot happen anymore with the new view engine) BUG: 281452 FIXED-IN: 4.8.0 --- src/panels/information/informationpanel.cpp | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/src/panels/information/informationpanel.cpp b/src/panels/information/informationpanel.cpp index 286861c59..3b4747b77 100644 --- a/src/panels/information/informationpanel.cpp +++ b/src/panels/information/informationpanel.cpp @@ -48,21 +48,13 @@ InformationPanel::~InformationPanel() void InformationPanel::setSelection(const KFileItemList& selection) { - if (!isVisible()) { - return; - } + m_selection = selection; + m_fileItem = KFileItem(); - if (selection.isEmpty() && m_selection.isEmpty()) { - // The selection has not really changed, only the current index. - // QItemSelectionModel emits a signal in this case and it is less - // expensive doing the check this way instead of patching - // DolphinView::emitSelectionChanged(). + if (!isVisible()) { return; } - m_selection = selection; - m_fileItem = KFileItem(); - const int count = selection.count(); if (count == 0) { if (!isEqualToShownUrl(url())) { -- 2.47.3