Project

General

Profile

Bug #3097

Drop() doesn't work when an item is held (with the mouse)

Added by Who Knows almost 2 years ago. Updated 20 days ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
GUI
Target version:
Start date:
12/20/2015
% Done:

100%

Reproducibility:
Always
Operating system:
Other
Severity:
Normal

Description

I'm trying to drop an item via script, but it doesn't work when the PC helds it in it's hands (not equipped). Here's the code snippet

    if ( player->GetEffect sEffectCharm == 0 ) ; gets true when the item is unequipped
    player->Drop foo 1
endif

What happens here is, that - although foo is dropped by the script - the items icon still sticks on the mouse pointer until you click into the inventory window. I'd assume that Drop() means: drop it right before the next frame. If an item is dropped here - only when the player does an action (like click on the ground) in order to make the item be dropped - Drop() is useless.

Bug confirmed: https://forum.openmw.org/viewtopic.php?f=2&t=3258&p=36286#p36286

Associated revisions

Revision 9b91ea5d (diff)
Added by scrawl . 23 days ago

Exit drag-and-drop if dragged item is deleted (Fixes #3097)

History

#1 Updated by Marc Zinnschlag almost 2 years ago

  • Category set to GUI
  • Target version set to openmw-0.38

#2 Updated by Marc Zinnschlag almost 2 years ago

  • Target version changed from openmw-0.38 to openmw-0.39

#3 Updated by Marc Zinnschlag over 1 year ago

  • Target version changed from openmw-0.39 to openmw-0.40

#4 Updated by Marc Zinnschlag about 1 year ago

  • Target version changed from openmw-0.40 to openmw-0.41

#5 Updated by Marc Zinnschlag 11 months ago

  • Target version changed from openmw-0.41 to openmw-0.42

#6 Updated by Marc Zinnschlag 6 months ago

  • Target version changed from openmw-0.42 to openmw-0.43

#7 Updated by scrawl . about 1 month ago

This should be easy to solve by checking if the item has been deleted (count 0) in the drag-and-drop handler every frame, and if so, stop dragging.

#8 Updated by scrawl . about 1 month ago

  • Target version deleted (openmw-0.43)

#9 Updated by scrawl . about 1 month ago

  • Status changed from New to Confirmed

#10 Updated by Alexei Dobrohotov 22 days ago

  • Status changed from Confirmed to Resolved
  • Assignee set to scrawl .
  • Target version set to openmw-0.43
  • % Done changed from 0 to 100
  • Operating system changed from Linux to Other

#11 Updated by Alexei Dobrohotov 20 days ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF