CEGUIDragContainer.cpp: DragContainer::onDragEnded
Here d_dropflag is set only to notify dropTarget that window is dropped.
Code: Select all
if (d_dropTarget)
{
// set flag - we need to detect if the position changed in a DragDropItemDropped
d_dropflag = true;
// Notify that item was dropped in the target window
d_dropTarget->notifyDragDropItemDropped(this);
// reset flag
d_dropflag = false;
}
But DragContainer::onMoved also depends on this flag:
Code: Select all
void DragContainer::onMoved(WindowEventArgs& e)
{
Window::onMoved(e);
if (d_dropflag)
{
d_startPosition = getPosition();
}
}
I checked that this if block is never executed(at least in my case when dragging DragContainer with StaticImage across FrameWindow).
So I made a workaround for the time being - called Window::setPosition() in DragContainer::onDragEnded to trigger DragContainer::onMoved().