]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphinview.cpp
use different icon for "Add to places" as suggested by David Vignoni
[dolphin.git] / src / dolphinview.cpp
index 0b8fe5883dfb7c2b836fca40fdd6657abacddebb..d4609d3828d3619172195cb46afd3bf862fbadb7 100644 (file)
@@ -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);