]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphiniconsview.cpp
If we should open the URL right away, then let's do it right away.
[dolphin.git] / src / dolphiniconsview.cpp
index 8d474f4bc5f15fe2b44b6ba94f6e4447c1170ef6..de0aaec97c1ed7391982a236efa4a117d3eb95f6 100644 (file)
@@ -225,17 +225,16 @@ void DolphinIconsView::dragMoveEvent(QDragMoveEvent* event)
     setDirtyRegion(m_dropRect);
 
     m_dropRect.setSize(QSize()); // set as invalid
-    bool destIsDir = false;
     if (index.isValid()) {
         const KFileItem item = itemForIndex(index);
         if (!item.isNull() && item.isDir()) {
             m_dropRect = visualRect(index);
-            destIsDir = true;
+        } else {
+            m_dropRect.setSize(QSize()); // set as invalid
         }
-    } else { // dropping on viewport
-        destIsDir = true;
     }
-    if (destIsDir && event->mimeData()->hasUrls()) {
+    if (event->mimeData()->hasUrls()) {
+        // accept url drops, independently from the destination item
         event->acceptProposedAction();
     }