mirror of
https://github.com/OpenMW/openmw.git
synced 2025-12-02 08:04:30 +00:00
Merge branch 'fixkaramunsing' into 'master'
Ensure draganddrop finishes when item is used from it Closes #8659 See merge request OpenMW/openmw!4847
This commit is contained in:
commit
ace1f7f3d0
1 changed files with 9 additions and 10 deletions
|
|
@ -666,19 +666,18 @@ namespace MWGui
|
||||||
if (excess > 0 && canStack)
|
if (excess > 0 && canStack)
|
||||||
invStore.unequipItemQuantity(ptr, excess);
|
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 (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();
|
mItemView->update();
|
||||||
|
|
||||||
notifyContentChanged();
|
notifyContentChanged();
|
||||||
}
|
}
|
||||||
// else: will be updated in open()
|
// else: will be updated in open()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue