┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/panels/information/informationpanel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/panels/information/informationpanel.cpp')
-rw-r--r--src/panels/information/informationpanel.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/panels/information/informationpanel.cpp b/src/panels/information/informationpanel.cpp
index 389fb4a52..b01524c49 100644
--- a/src/panels/information/informationpanel.cpp
+++ b/src/panels/information/informationpanel.cpp
@@ -327,8 +327,7 @@ void InformationPanel::slotFilesRemoved(const QStringList& files)
if (m_shownUrl == KUrl(fileName)) {
// the currently shown item has been removed, show
// the parent directory as fallback
- m_shownUrl = url();
- showItemInfo();
+ reset();
break;
}
}
@@ -349,8 +348,7 @@ void InformationPanel::slotLeftDirectory(const QString& directory)
// has been unmounted. In this case no directory change will be
// done in Dolphin, but the Information Panel must be updated to
// indicate an invalid directory.
- m_shownUrl = url();
- showItemInfo();
+ reset();
}
}
@@ -502,6 +500,14 @@ void InformationPanel::setNameLabelText(const QString& text)
m_nameLabel->setText(wrappedText);
}
+void InformationPanel::reset()
+{
+ m_selection.clear();
+ m_shownUrl = url();
+ m_fileItem = KFileItem();
+ showItemInfo();
+}
+
void InformationPanel::init()
{
const int spacing = KDialog::spacingHint();