History

removed _mouse{X,Y}

Atlante45 committed 11 years ago

Commit ee124f51 parent 469c9582 files · +3 −20Browse files

Showing the changes to interface/src/Application.cpp (1 of 2 files). Show all

Unified · Split

interface/src/Application.cpp+1−16
@@ -165,8 +165,6 @@ Application::Application(int& argc, char** argv, QElapsedTimer &startup_time) : · 164 unmodified lines
165165 _scaleMirror(1.0f),
166166 _rotateMirror(0.0f),
167167 _raiseMirror(0.0f),
168− _mouseX(0),
169− _mouseY(0),
170168 _lastMouseMove(usecTimestampNow()),
171169 _lastMouseMoveWasSimulated(false),
172170 _mouseHidden(false),
@@ -1282,9 +1280,6 @@ void Application::mouseMoveEvent(QMouseEvent* event, unsigned int deviceID) { · 1109 unmodified lines
12821280 _mouseHidden = false;
12831281 _seenMouseMove = true;
12841282 }
1285−
1286− _mouseX = event->x();
1287− _mouseY = event->y();
12881283 }
12891284
12901285 void Application::mousePressEvent(QMouseEvent* event, unsigned int deviceID) {
@@ -1302,8 +1297,6 @@ void Application::mousePressEvent(QMouseEvent* event, unsigned int deviceID) { · 11 unmodified lines
13021297
13031298 if (activeWindow() == _window) {
13041299 if (event->button() == Qt::LeftButton) {
1305− _mouseX = event->x();
1306− _mouseY = event->y();
13071300 _mouseDragStartedX = getTrueMouseX();
13081301 _mouseDragStartedY = getTrueMouseY();
13091302 _mousePressed = true;
@@ -1346,8 +1339,6 @@ void Application::mouseReleaseEvent(QMouseEvent* event, unsigned int deviceID) { · 36 unmodified lines
13461339
13471340 if (activeWindow() == _window) {
13481341 if (event->button() == Qt::LeftButton) {
1349− _mouseX = event->x();
1350− _mouseY = event->y();
13511342 _mousePressed = false;
13521343
13531344 if (Menu::getInstance()->isOptionChecked(MenuOption::Stats) && mouseOnScreen()) {
@@ -1940,9 +1931,6 @@ void Application::init() { · 586 unmodified lines
19401931 _voxelShader.init();
19411932 _pointShader.init();
19421933
1943− _mouseX = _glWidget->width() / 2;
1944− _mouseY = _glWidget->height() / 2;
1945−
19461934 // TODO: move _myAvatar out of Application. Move relevant code to MyAvataar or AvatarManager
19471935 _avatarManager.init();
19481936 _myCamera.setMode(CAMERA_MODE_FIRST_PERSON);
@@ -3557,9 +3545,6 @@ void Application::deleteVoxelAt(const VoxelDetail& voxel) { · 1608 unmodified lines
35573545 }
35583546
35593547 void Application::resetSensors() {
3560− _mouseX = _glWidget->width() / 2;
3561− _mouseY = _glWidget->height() / 2;
3562−
35633548 _faceshift.reset();
35643549 _visage.reset();
35653550 _dde.reset();
@@ -3572,7 +3557,7 @@ void Application::resetSensors() { · 6 unmodified lines
35723557 QScreen* currentScreen = _window->windowHandle()->screen();
35733558 QWindow* mainWindow = _window->windowHandle();
35743559 QPoint windowCenter = mainWindow->geometry().center();
3575− QCursor::setPos(currentScreen, windowCenter);
3560+ _glWidget->cursor().setPos(currentScreen, windowCenter);
35763561
35773562 _myAvatar->reset();
35783563

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t