From c47aac3361327acf859ab590ec53d3f6f2d370f9 Mon Sep 17 00:00:00 2001 From: Harald Hvaal Date: Thu, 26 Mar 2009 13:44:52 +0000 Subject: Forwardport of r944888 BUG: 187884 Do not start a new drag while one is currently underway. svn path=/trunk/KDE/kdebase/apps/; revision=944917 --- src/draganddrophelper.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/draganddrophelper.cpp') diff --git a/src/draganddrophelper.cpp b/src/draganddrophelper.cpp index 002394155..c80aec786 100644 --- a/src/draganddrophelper.cpp +++ b/src/draganddrophelper.cpp @@ -55,6 +55,12 @@ void DragAndDropHelper::startDrag(QAbstractItemView* itemView, Qt::DropActions supportedActions, DolphinController* controller) { + //do not start a new drag until the previous one has been finished + //This is a (possibly temporary) fix for bug #187884 + static bool isDragging = false; + if (isDragging) return; + isDragging = true; + QModelIndexList indexes = itemView->selectionModel()->selectedIndexes(); if (indexes.count() > 0) { QMimeData *data = itemView->model()->mimeData(indexes); @@ -85,6 +91,7 @@ void DragAndDropHelper::startDrag(QAbstractItemView* itemView, drag->exec(supportedActions, Qt::IgnoreAction); m_dragSource = 0; } + isDragging = false; } bool DragAndDropHelper::isDragSource(QAbstractItemView* itemView) -- cgit v1.3