X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/60bd873e9f42d22f2d4dae8d1ed43ebbc23c600f..51bd6cfdfad4d1be706f6dc125762889c19fcc5a:/src/views/dolphinview.cpp diff --git a/src/views/dolphinview.cpp b/src/views/dolphinview.cpp index ef39414c9..80be1e592 100644 --- a/src/views/dolphinview.cpp +++ b/src/views/dolphinview.cpp @@ -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(); }