]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Forwardport of r944888
authorHarald Hvaal <haraldhv@stud.ntnu.no>
Thu, 26 Mar 2009 13:44:52 +0000 (13:44 +0000)
committerHarald Hvaal <haraldhv@stud.ntnu.no>
Thu, 26 Mar 2009 13:44:52 +0000 (13:44 +0000)
BUG: 187884
Do not start a new drag while one is currently underway.

svn path=/trunk/KDE/kdebase/apps/; revision=944917

src/draganddrophelper.cpp

index 002394155f74b4fdb97a529dfa54ae00a37c0e76..c80aec7869254b7e10071b06369b595899f9c100 100644 (file)
@@ -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)