]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/views/dolphinview.cpp
Remember the row- and column-information for visible items
[dolphin.git] / src / views / dolphinview.cpp
index ef39414c9f61980818b3c977a6242b30b73e350a..80be1e592c63991c95a30d6520bc92b1f1375720 100644 (file)
@@ -448,9 +448,16 @@ void DolphinView::stopLoading()
 
 void DolphinView::readSettings()
 {
+    const int oldZoomLevel = m_container->zoomLevel();
+    
     GeneralSettings::self()->readConfig();
     m_container->readSettings();
     applyViewProperties();
+    
+    const int newZoomLevel = m_container->zoomLevel();
+    if (newZoomLevel != oldZoomLevel) {
+        emit zoomLevelChanged(newZoomLevel, oldZoomLevel);
+    }
 }
 
 void DolphinView::writeSettings()
@@ -687,6 +694,12 @@ void DolphinView::wheelEvent(QWheelEvent* event)
     }
 }
 
+void DolphinView::hideEvent(QHideEvent* event)
+{
+    hideToolTip();
+    QWidget::hideEvent(event);
+}
+
 void DolphinView::activate()
 {
     setActive(true);
@@ -817,10 +830,13 @@ void DolphinView::slotItemDropEvent(int index, QGraphicsSceneDragDropEvent* even
 {
     KUrl destUrl;
     KFileItem destItem = fileItemModel()->fileItem(index);
-    if (destItem.isNull()) {
+    if (destItem.isNull() || (!destItem.isDir() && !destItem.isDesktopFile())) {
+        // Use the URL of the view as drop target if the item is no directory
+        // or desktop-file
         destItem = fileItemModel()->rootItem();
         destUrl = url();
     } else {
+        // The item represents a directory or desktop-file
         destUrl = destItem.url();
     }