mirror of
https://github.com/leozide/leocad
synced 2025-01-17 18:11:42 +01:00
Fixed double click not doing anything.
This commit is contained in:
parent
c7cdb96abb
commit
9c40092395
2 changed files with 21 additions and 0 deletions
|
@ -248,6 +248,26 @@ void lcQGLWidget::mouseReleaseEvent(QMouseEvent *event)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void lcQGLWidget::mouseDoubleClickEvent(QMouseEvent *event)
|
||||||
|
{
|
||||||
|
float scale = deviceScale();
|
||||||
|
|
||||||
|
widget->mInputState.x = event->x() * scale;
|
||||||
|
widget->mInputState.y = widget->mHeight - event->y() * scale - 1;
|
||||||
|
widget->mInputState.Control = (event->modifiers() & Qt::ControlModifier) != 0;
|
||||||
|
widget->mInputState.Shift = (event->modifiers() & Qt::ShiftModifier) != 0;
|
||||||
|
widget->mInputState.Alt = (event->modifiers() & Qt::AltModifier) != 0;
|
||||||
|
|
||||||
|
switch (event->button())
|
||||||
|
{
|
||||||
|
case Qt::LeftButton:
|
||||||
|
widget->OnLeftButtonDoubleClick();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void lcQGLWidget::mouseMoveEvent(QMouseEvent *event)
|
void lcQGLWidget::mouseMoveEvent(QMouseEvent *event)
|
||||||
{
|
{
|
||||||
float scale = deviceScale();
|
float scale = deviceScale();
|
||||||
|
|
|
@ -33,6 +33,7 @@ protected:
|
||||||
void keyReleaseEvent(QKeyEvent *event);
|
void keyReleaseEvent(QKeyEvent *event);
|
||||||
void mousePressEvent(QMouseEvent *event);
|
void mousePressEvent(QMouseEvent *event);
|
||||||
void mouseReleaseEvent(QMouseEvent *event);
|
void mouseReleaseEvent(QMouseEvent *event);
|
||||||
|
void mouseDoubleClickEvent(QMouseEvent *event);
|
||||||
void mouseMoveEvent(QMouseEvent *event);
|
void mouseMoveEvent(QMouseEvent *event);
|
||||||
void wheelEvent(QWheelEvent *event);
|
void wheelEvent(QWheelEvent *event);
|
||||||
void dragEnterEvent(QDragEnterEvent *event);
|
void dragEnterEvent(QDragEnterEvent *event);
|
||||||
|
|
Loading…
Reference in a new issue