From 03aa2029d7c65071d054444c375e2ddb89ea6f12 Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Sun, 4 May 2008 18:24:28 +0000 Subject: Fixed issue that sometimes the dragging from an inactive view to an active view does not work. Note that this is just a workaround, QAbstractItemView should take care about this itself. I tried to provide a Qt-only example for this, but it is more tricky than I thought: it seems some expensive operations are required, so that the position of the second mouse-move event is outside the item area... I'll retest this issue without workaround if Qt 4.4 final is out. BUG: 154619 svn path=/trunk/KDE/kdebase/apps/; revision=803980 --- src/dolphindetailsview.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/dolphindetailsview.cpp') diff --git a/src/dolphindetailsview.cpp b/src/dolphindetailsview.cpp index 08d03fb0b..29ee90830 100644 --- a/src/dolphindetailsview.cpp +++ b/src/dolphindetailsview.cpp @@ -188,6 +188,11 @@ void DolphinDetailsView::mousePressEvent(QMouseEvent* event) QTreeView::mousePressEvent(event); const QModelIndex index = indexAt(event->pos()); + if (index.isValid() && (event->button() == Qt::LeftButton)) { + // TODO: see comment in DolphinIconsView::mousePressEvent() + setState(QAbstractItemView::DraggingState); + } + if (!index.isValid() || (index.column() != DolphinModel::Name)) { const Qt::KeyboardModifiers modifier = QApplication::keyboardModifiers(); if (!(modifier & Qt::ShiftModifier) && !(modifier & Qt::ControlModifier)) { @@ -250,6 +255,7 @@ void DolphinDetailsView::mouseReleaseEvent(QMouseEvent* event) void DolphinDetailsView::startDrag(Qt::DropActions supportedActions) { DragAndDropHelper::startDrag(this, supportedActions); + m_showElasticBand = false; } void DolphinDetailsView::dragEnterEvent(QDragEnterEvent* event) -- cgit v1.3