Download

Drag N Drop Issue

Hello, I have an inventory widget and a HUD widget. I created a drag and drop operation to move the inventory around the screen. However I have a problem, after I move it anywhere, it stops updating. Like texts, new icons etc do not appear. The code works tho, it prints a text for example, but it won’t update the interface. This problem seems to be created because I use “remove from parent” (to prevent 2 windows to appear) and after I drop it, I use Add To Viewport from the HUD(using OnDrop function). Any ideas about this problem?

Can you post your blueprints?

Here you go: http://imgur.com/a/OoAJ6

instead of adding to viewport, get your HUDs canvas panel and add child there.

Thanks for the answer, that doesn’t seem to work either. The window still doesn’t update.

EDIT: I should mention, that if I don’t use Remove from parent, then i get 2 windows but both update just fine.

I will post my widgets when I get home as I do not have this issue and my widgets move smoothly, currently just about to leave for work

Okay, thank you very much.

Alright, here is my drop for my widget, which works as intended after removing from parent
03b06fe19d2b452c818d870ed2337ec8e2a47fb8.png

Thanks, I made it like this but the problem isn’t fixed. Works fine as drag n drop but it doesn’t update afterwards. I have a print node, the text appears, says “updated” but the UI doesn’t update!

I made a small video to show the problem:

https://youtube.com/watch?v=uPs6q9O9Klc

I found a workaround but I have 1 more issue. Here’s what I have:

f9f6ba908d42dcde9cf1721718b91f04763029aa.jpeg

6a60dabc245a3592f495b82c3b3a9fce825046ae.jpeg

This moves the main widget out of the screen, and when I “drop” it, the visual goes away and the normal widget returns to it’s position.
This works for the first drag. However, if I drag it again, when I “drop” the widget, it jumps to another location. Any ideas what I am doing wrong?

Can you post your code for when you add items to your inventory? your drag and drop seems to work, im just curious what im missing. ive tried figuring it out but i really cant seem to locate the issue.

-please ignore my horrid grammar, its super late for me

Thanks for the answer. The problem is not in the inventory itself, it’s the widget. I made a new clean widget so it’s less confusing, and I show exactly what I have inside, and then I added it to my main HUD. You will see, it’s really weird.
Here you go:
https://youtube.com/watch?v=ZiJ9jfqwAwI

Hmm odd, what version of unreal are you using? I tried to replicate your issue but mine still works as intended

I am using the latest version, 4.12.4, I compiled it myself. I added you on skype. I will also try to update the source(if they have any new updates) and recompile the entire engine.