From f8690dcd2083e6ec0ab006d367c78bf2827c1430 Mon Sep 17 00:00:00 2001 From: scrawl Date: Fri, 16 Dec 2016 20:16:59 +0100 Subject: [PATCH] Set the drag-and-drop state after initiating the drag, not before (Fixes #3134) --- apps/openmw/mwgui/draganddrop.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/openmw/mwgui/draganddrop.cpp b/apps/openmw/mwgui/draganddrop.cpp index 55aeb969c5..6053a7fb0a 100644 --- a/apps/openmw/mwgui/draganddrop.cpp +++ b/apps/openmw/mwgui/draganddrop.cpp @@ -36,7 +36,6 @@ void DragAndDrop::startDrag (int index, SortFilterItemModel* sortModel, ItemMode mSourceModel = sourceModel; mSourceView = sourceView; mSourceSortModel = sortModel; - mIsOnDragAndDrop = true; // If picking up an item that isn't from the player's inventory, the item gets added to player inventory backend // immediately, even though it's still floating beneath the mouse cursor. A bit counterintuitive, @@ -88,6 +87,8 @@ void DragAndDrop::startDrag (int index, SortFilterItemModel* sortModel, ItemMode sourceView->update(); MWBase::Environment::get().getWindowManager()->setDragDrop(true); + + mIsOnDragAndDrop = true; } void DragAndDrop::drop(ItemModel *targetModel, ItemView *targetView)