mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-25 15:35:23 +00:00
trigger mouse click actions on release instead of on press (avoids problems with dragging)
This commit is contained in:
parent
f3ee3f5be1
commit
d2e92fd36f
@ -563,25 +563,14 @@ void CSVRender::WorldspaceWidget::mousePressEvent (QMouseEvent *event)
|
||||
|
||||
if (!mDragging)
|
||||
mDragMode = button;
|
||||
|
||||
if (button=="p-navi" || button=="s-navi")
|
||||
{
|
||||
|
||||
}
|
||||
else if (button=="p-edit" || button=="s-edit" || button=="select")
|
||||
{
|
||||
osg::ref_ptr<TagBase> tag = mousePick (event);
|
||||
|
||||
handleMouseClick (tag, button);
|
||||
}
|
||||
}
|
||||
|
||||
void CSVRender::WorldspaceWidget::mouseReleaseEvent (QMouseEvent *event)
|
||||
{
|
||||
std::string button = mapButton (event);
|
||||
|
||||
if (mDragging)
|
||||
{
|
||||
std::string button = mapButton (event);
|
||||
|
||||
if (mDragMode=="p-navi" || mDragMode=="s-navi")
|
||||
{
|
||||
|
||||
@ -594,6 +583,19 @@ void CSVRender::WorldspaceWidget::mouseReleaseEvent (QMouseEvent *event)
|
||||
mDragging = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (button=="p-navi" || button=="s-navi")
|
||||
{
|
||||
|
||||
}
|
||||
else if (button=="p-edit" || button=="s-edit" || button=="select")
|
||||
{
|
||||
osg::ref_ptr<TagBase> tag = mousePick (event);
|
||||
|
||||
handleMouseClick (tag, button);
|
||||
}
|
||||
}
|
||||
|
||||
mDragMode.clear();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user