InformationPanel ensure to have a showUrl when no items are selected

This commit is contained in:
Méven Car 2021-03-12 07:18:52 +01:00 committed by Elvis Angelaccio
parent 7d6aaf4c07
commit 8048e6ed1b

View file

@ -59,6 +59,7 @@ void InformationPanel::setSelection(const KFileItemList& selection)
m_shownUrl = url();
showItemInfo();
}
m_infoTimer->stop();
} else {
if ((count == 1) && !selection.first().url().isEmpty()) {
m_urlCandidate = selection.first().url();
@ -235,6 +236,7 @@ void InformationPanel::showItemInfo()
if (item.isNull()) {
// No item is hovered and no selection has been done: provide
// an item for the currently shown directory.
m_shownUrl = url();
m_folderStatJob = KIO::statDetails(url(), KIO::StatJob::SourceSide, KIO::StatDefaultDetails | KIO::StatRecursiveSize, KIO::HideProgressInfo);
if (m_folderStatJob->uiDelegate()) {
KJobWidgets::setWindow(m_folderStatJob, this);