mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 18:50:00 +02:00
fix bug in resetSensors moving cursor to center of window on multiple screen systems
This commit is contained in:
parent
e35242345c
commit
6108f7d9cd
1 changed files with 5 additions and 2 deletions
|
@ -3502,7 +3502,6 @@ void Application::deleteVoxelAt(const VoxelDetail& voxel) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Application::resetSensors() {
|
void Application::resetSensors() {
|
||||||
_mouseX = _glWidget->width() / 2;
|
_mouseX = _glWidget->width() / 2;
|
||||||
_mouseY = _glWidget->height() / 2;
|
_mouseY = _glWidget->height() / 2;
|
||||||
|
@ -3516,7 +3515,11 @@ void Application::resetSensors() {
|
||||||
_prioVR.reset();
|
_prioVR.reset();
|
||||||
//_leapmotion.reset();
|
//_leapmotion.reset();
|
||||||
|
|
||||||
QCursor::setPos(_mouseX, _mouseY);
|
QScreen* currentScreen = _window->windowHandle()->screen();
|
||||||
|
QWindow* mainWindow = _window->windowHandle();
|
||||||
|
QPoint windowCenter = mainWindow->geometry().center();
|
||||||
|
QCursor::setPos(currentScreen, windowCenter);
|
||||||
|
|
||||||
_myAvatar->reset();
|
_myAvatar->reset();
|
||||||
|
|
||||||
QMetaObject::invokeMethod(&_audio, "reset", Qt::QueuedConnection);
|
QMetaObject::invokeMethod(&_audio, "reset", Qt::QueuedConnection);
|
||||||
|
|
Loading…
Reference in a new issue