Fix for click and drag with sixense

This commit is contained in:
barnold1953 2014-06-12 15:39:40 -07:00
parent a13ef5c3bf
commit 91f23fcf2d
2 changed files with 11 additions and 2 deletions

View file

@ -381,7 +381,17 @@ void SixenseManager::emulateMouse(PalmData* palm, int index) {
if (pos.x() != _oldX[index] || pos.y() != _oldY[index]) {
QMouseEvent mouseEvent(static_cast<QEvent::Type>(CONTROLLER_MOVE_EVENT), pos, Qt::NoButton, Qt::NoButton, 0);
Application::getInstance()->mouseMoveEvent(&mouseEvent);
//Only send the mouse event if the opposite left button isnt held down.
//This is specifically for edit voxels
if (triggerButton == Qt::LeftButton) {
if (!_triggerPressed[(int)(!index)]) {
Application::getInstance()->mouseMoveEvent(&mouseEvent);
}
} else {
if (!_bumperPressed[(int)(!index)]) {
Application::getInstance()->mouseMoveEvent(&mouseEvent);
}
}
}
_oldX[index] = pos.x();
_oldY[index] = pos.y();

View file

@ -289,7 +289,6 @@ void ApplicationOverlay::renderPointers() {
mouseX -= pointerWidth / 2.0f;
mouseY += pointerHeight / 2.0f;
glBegin(GL_QUADS);
glColor3f(1, 0, 0);