Skip to content

dnd: Update actor position after scaling even when animations are off

The code to update the actor position based on the cursor and current scale was run in a 'new-frame' handler. This is working fine when animations are enabled, but when they are turned off this does not work. This is because the 'new-frame' signal is emitted before the changes for that frame are applied. So with animations off the position was only ever updated with the starting values. As a result the shrunk actor was not being dragged by the position where it was clicked, but by where it was clicked in the original size, which is likely not even on the shrunk actor.

This change now also updates the position in the onComplete handler which gets run with the final scale, even if the duration is 0.

Fixes #1699 (closed)

Merge request reports