diff options
| author | Peter Penz <[email protected]> | 2011-12-06 18:49:12 +0100 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2011-12-06 18:53:42 +0100 |
| commit | 899c171a2b62f0666dbe2ed755d51a8ae0f7ef9f (patch) | |
| tree | c6a88b1d685eb86f0a7382bca6d9596c4aadd4ad /src/panels/information/informationpanel.cpp | |
| parent | 0db284750490a65bf5c8a0d9177010fac94b11c8 (diff) | |
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
Diffstat (limited to 'src/panels/information/informationpanel.cpp')
| -rw-r--r-- | src/panels/information/informationpanel.cpp | 14 |
1 files 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())) { |
