X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/525fdd8afc1468dc72e6a150cf75dee4c330bdcd..4e43b5465fa54f13273e7a15985a8a2b941ae60e:/src/dolphinview.cpp diff --git a/src/dolphinview.cpp b/src/dolphinview.cpp index 0b8fe5883..d4609d382 100644 --- a/src/dolphinview.cpp +++ b/src/dolphinview.cpp @@ -147,6 +147,7 @@ void DolphinView::setActive(bool active) } m_active = active; + m_selectionModel->clearSelection(); QColor color = KColorScheme(QPalette::Active, KColorScheme::View).background().color(); if (active) { @@ -816,7 +817,7 @@ void DolphinView::updateCutItems() void DolphinView::showHoverInformation(const KFileItem& item) { - if (hasSelection()) { + if (hasSelection() || !m_active) { return; } @@ -825,7 +826,9 @@ void DolphinView::showHoverInformation(const KFileItem& item) void DolphinView::clearHoverInformation() { - emit requestItemInfo(KFileItem()); + if (m_active) { + emit requestItemInfo(KFileItem()); + } } @@ -867,7 +870,9 @@ void DolphinView::createView() m_selectionModel = view->selectionModel(); } - m_selectionModel->setParent(this); //Reparent the selection model. We do not want it to be deleted when we delete the model + // reparent the selection model, as it should not be deleted + // when deleting the model + m_selectionModel->setParent(this); view->setSelectionMode(QAbstractItemView::ExtendedSelection);