]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphincolumnwidget.cpp
Show elastic band on the column widget
[dolphin.git] / src / dolphincolumnwidget.cpp
index 7d29251ea62057abdaa79ef15521ea76cedc7420..6f88fd27747eb22cc45801f2ac8031892f2616a0 100644 (file)
@@ -68,6 +68,7 @@ DolphinColumnWidget::DolphinColumnWidget(QWidget* parent,
     setSelectionMode(QAbstractItemView::ExtendedSelection);
     setDragDropMode(QAbstractItemView::DragDrop);
     setDropIndicatorShown(false);
+    setSelectionRectVisible(true);
 
 // TODO: Remove this check when 4.3.2 is released and KDE requires it... this
 //       check avoids a division by zero happening on versions before 4.3.1.
@@ -247,6 +248,11 @@ void DolphinColumnWidget::dragMoveEvent(QDragMoveEvent* event)
         }
     }
     setDirtyRegion(m_dropRect);
+
+    if (event->mimeData()->hasUrls()) {
+        // accept url drops, independently from the destination item
+        event->acceptProposedAction();
+    }
 }
 
 void DolphinColumnWidget::dropEvent(QDropEvent* event)
@@ -290,7 +296,7 @@ void DolphinColumnWidget::paintEvent(QPaintEvent* event)
     // TODO: remove this code when the issue #160611 is solved in Qt 4.4
     if (m_dragging) {
         const QBrush& brush = viewOptions().palette.brush(QPalette::Normal, QPalette::Highlight);
-        DragAndDropHelper::drawHoverIndication(viewport(), m_dropRect, brush);
+        DragAndDropHelper::drawHoverIndication(this, m_dropRect, brush);
     }
 }