mirror of
https://github.com/edubart/otclient.git
synced 2025-12-26 17:57:11 +01:00
drag fixes
This commit is contained in:
@@ -83,13 +83,11 @@ void UIManager::inputEvent(const InputEvent& event)
|
||||
auto clickedChildren = m_rootWidget->recursiveGetChildrenByPos(event.mousePos);
|
||||
UIWidgetPtr droppedWidget;
|
||||
for(const UIWidgetPtr& child : clickedChildren) {
|
||||
if(child != m_draggingWidget) {
|
||||
if(child->onDrop(m_draggingWidget, event.mousePos)) {
|
||||
droppedWidget = child;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(droppedWidget)
|
||||
droppedWidget->onDrop(m_draggingWidget, event.mousePos);
|
||||
|
||||
m_draggingWidget->onDragLeave(droppedWidget, event.mousePos);
|
||||
m_draggingWidget->setDragging(false);
|
||||
|
||||
Reference in New Issue
Block a user