From 41e2282501d16f0bd6d9123525fc1ec2cdc66d24 Mon Sep 17 00:00:00 2001 From: Kuyondo Date: Mon, 11 Aug 2025 22:16:10 +0800 Subject: [PATCH] fix #8659 --- apps/openmw/mwgui/inventorywindow.cpp | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/apps/openmw/mwgui/inventorywindow.cpp b/apps/openmw/mwgui/inventorywindow.cpp index 4a621831f4..f1b4a8d837 100644 --- a/apps/openmw/mwgui/inventorywindow.cpp +++ b/apps/openmw/mwgui/inventorywindow.cpp @@ -666,19 +666,18 @@ namespace MWGui if (excess > 0 && canStack) invStore.unequipItemQuantity(ptr, excess); + if (mDragAndDrop->mIsOnDragAndDrop && isFromDragAndDrop) + { + // Feature: Don't finish draganddrop if potion or ingredient was used + if (type == ESM::Potion::sRecordId || type == ESM::Ingredient::sRecordId) + mDragAndDrop->update(); + else + mDragAndDrop->finish(); + } + if (isVisible()) { - if (isFromDragAndDrop) - { - // Feature: Don't stop draganddrop if potion or ingredient was used - if (ptr.getType() != ESM::Potion::sRecordId && ptr.getType() != ESM::Ingredient::sRecordId) - mDragAndDrop->finish(); - else - mDragAndDrop->update(); - } - mItemView->update(); - notifyContentChanged(); } // else: will be updated in open()