mirror of
https://github.com/edubart/otclient.git
synced 2025-10-14 11:34:54 +02:00
fix some ui events
This commit is contained in:
@@ -364,6 +364,9 @@ void UILineEdit::onKeyPress(UIKeyEvent& event)
|
||||
event.ignore();
|
||||
} else
|
||||
event.ignore();
|
||||
|
||||
if(!event.isAccepted())
|
||||
UIWidget::onKeyPress(event);
|
||||
}
|
||||
|
||||
void UILineEdit::onMousePress(UIMouseEvent& event)
|
||||
|
@@ -687,8 +687,6 @@ void UIWidget::onKeyPress(UIKeyEvent& event)
|
||||
|
||||
if(event.isAccepted())
|
||||
break;
|
||||
else
|
||||
child->UIWidget::onKeyPress(event);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -712,8 +710,6 @@ void UIWidget::onKeyRelease(UIKeyEvent& event)
|
||||
|
||||
if(event.isAccepted())
|
||||
break;
|
||||
else
|
||||
child->UIWidget::onKeyRelease(event);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -741,8 +737,6 @@ void UIWidget::onMousePress(UIMouseEvent& event)
|
||||
|
||||
if(event.isAccepted())
|
||||
break;
|
||||
else
|
||||
child->UIWidget::onMousePress(event);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -764,8 +758,6 @@ void UIWidget::onMouseRelease(UIMouseEvent& event)
|
||||
|
||||
if(event.isAccepted())
|
||||
break;
|
||||
else
|
||||
child->UIWidget::onMouseRelease(event);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -798,8 +790,6 @@ void UIWidget::onMouseMove(UIMouseEvent& event)
|
||||
|
||||
if(event.isAccepted())
|
||||
break;
|
||||
else
|
||||
child->UIWidget::onMouseMove(event);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -823,7 +813,5 @@ void UIWidget::onMouseWheel(UIMouseEvent& event)
|
||||
|
||||
if(event.isAccepted())
|
||||
break;
|
||||
else
|
||||
child->UIWidget::onMouseWheel(event);
|
||||
}
|
||||
}
|
||||
|
@@ -97,7 +97,7 @@ void UIWindow::onMousePress(UIMouseEvent& event)
|
||||
m_moving = true;
|
||||
m_movingReference = event.pos() - getGeometry().topLeft();
|
||||
} else
|
||||
event.ignore();
|
||||
UIWidget::onMousePress(event);
|
||||
}
|
||||
|
||||
void UIWindow::onMouseRelease(UIMouseEvent& event)
|
||||
@@ -105,7 +105,7 @@ void UIWindow::onMouseRelease(UIMouseEvent& event)
|
||||
if(m_moving)
|
||||
m_moving = false;
|
||||
else
|
||||
event.ignore();
|
||||
UIWidget::onMouseRelease(event);
|
||||
}
|
||||
|
||||
void UIWindow::onMouseMove(UIMouseEvent& event)
|
||||
@@ -113,5 +113,5 @@ void UIWindow::onMouseMove(UIMouseEvent& event)
|
||||
if(m_moving)
|
||||
move(event.pos() - m_movingReference);
|
||||
else
|
||||
event.ignore();
|
||||
UIWidget::onMouseMove(event);
|
||||
}
|
||||
|
Reference in New Issue
Block a user