Showing the changes to interface/src/Application.cpp (1 of 2 files). Show all
Unified · Split
| @@ -165,8 +165,6 @@ Application::Application(int& argc, char** argv, QElapsedTimer &startup_time) : · 164 unmodified lines | ||
| 165 | 165 | _scaleMirror(1.0f), |
| 166 | 166 | _rotateMirror(0.0f), |
| 167 | 167 | _raiseMirror(0.0f), |
| 168 | − _mouseX(0), | |
| 169 | − _mouseY(0), | |
| 170 | 168 | _lastMouseMove(usecTimestampNow()), |
| 171 | 169 | _lastMouseMoveWasSimulated(false), |
| 172 | 170 | _mouseHidden(false), |
| @@ -1282,9 +1280,6 @@ void Application::mouseMoveEvent(QMouseEvent* event, unsigned int deviceID) { · 1109 unmodified lines | ||
| 1282 | 1280 | _mouseHidden = false; |
| 1283 | 1281 | _seenMouseMove = true; |
| 1284 | 1282 | } |
| 1285 | − | |
| 1286 | − _mouseX = event->x(); | |
| 1287 | − _mouseY = event->y(); | |
| 1288 | 1283 | } |
| 1289 | 1284 | |
| 1290 | 1285 | void Application::mousePressEvent(QMouseEvent* event, unsigned int deviceID) { |
| @@ -1302,8 +1297,6 @@ void Application::mousePressEvent(QMouseEvent* event, unsigned int deviceID) { · 11 unmodified lines | ||
| 1302 | 1297 | |
| 1303 | 1298 | if (activeWindow() == _window) { |
| 1304 | 1299 | if (event->button() == Qt::LeftButton) { |
| 1305 | − _mouseX = event->x(); | |
| 1306 | − _mouseY = event->y(); | |
| 1307 | 1300 | _mouseDragStartedX = getTrueMouseX(); |
| 1308 | 1301 | _mouseDragStartedY = getTrueMouseY(); |
| 1309 | 1302 | _mousePressed = true; |
| @@ -1346,8 +1339,6 @@ void Application::mouseReleaseEvent(QMouseEvent* event, unsigned int deviceID) { · 36 unmodified lines | ||
| 1346 | 1339 | |
| 1347 | 1340 | if (activeWindow() == _window) { |
| 1348 | 1341 | if (event->button() == Qt::LeftButton) { |
| 1349 | − _mouseX = event->x(); | |
| 1350 | − _mouseY = event->y(); | |
| 1351 | 1342 | _mousePressed = false; |
| 1352 | 1343 | |
| 1353 | 1344 | if (Menu::getInstance()->isOptionChecked(MenuOption::Stats) && mouseOnScreen()) { |
| @@ -1940,9 +1931,6 @@ void Application::init() { · 586 unmodified lines | ||
| 1940 | 1931 | _voxelShader.init(); |
| 1941 | 1932 | _pointShader.init(); |
| 1942 | 1933 | |
| 1943 | − _mouseX = _glWidget->width() / 2; | |
| 1944 | − _mouseY = _glWidget->height() / 2; | |
| 1945 | − | |
| 1946 | 1934 | // TODO: move _myAvatar out of Application. Move relevant code to MyAvataar or AvatarManager |
| 1947 | 1935 | _avatarManager.init(); |
| 1948 | 1936 | _myCamera.setMode(CAMERA_MODE_FIRST_PERSON); |
| @@ -3557,9 +3545,6 @@ void Application::deleteVoxelAt(const VoxelDetail& voxel) { · 1608 unmodified lines | ||
| 3557 | 3545 | } |
| 3558 | 3546 | |
| 3559 | 3547 | void Application::resetSensors() { |
| 3560 | − _mouseX = _glWidget->width() / 2; | |
| 3561 | − _mouseY = _glWidget->height() / 2; | |
| 3562 | − | |
| 3563 | 3548 | _faceshift.reset(); |
| 3564 | 3549 | _visage.reset(); |
| 3565 | 3550 | _dde.reset(); |
| @@ -3572,7 +3557,7 @@ void Application::resetSensors() { · 6 unmodified lines | ||
| 3572 | 3557 | QScreen* currentScreen = _window->windowHandle()->screen(); |
| 3573 | 3558 | QWindow* mainWindow = _window->windowHandle(); |
| 3574 | 3559 | QPoint windowCenter = mainWindow->geometry().center(); |
| 3575 | − QCursor::setPos(currentScreen, windowCenter); | |
| 3560 | + _glWidget->cursor().setPos(currentScreen, windowCenter); | |
| 3576 | 3561 | |
| 3577 | 3562 | _myAvatar->reset(); |
| 3578 | 3563 | |