Emulate right dragging with Option+left drag in Qt4 front-end for Mac OS X.

ver1_6_1
Chris Laurel 2008-02-12 01:41:49 +00:00
parent a719f6d17e
commit 62df109b68
1 changed files with 11 additions and 0 deletions

View File

@ -212,6 +212,17 @@ void CelestiaGlWidget::mouseMoveEvent(QMouseEvent* m)
buttons |= CelestiaCore::ShiftKey;
if (m->modifiers() & ControlModifier)
buttons |= CelestiaCore::ControlKey;
#ifdef TARGET_OS_MAC
// On the Mac, right dragging is be simulated with Option+left drag.
// We may want to enable this on other platforms, though it's mostly only helpful
// for users with single button mice.
if (m->modifiers() & AltModifier)
{
buttons &= ~CelestiaCore::LeftButton;
buttons |= CelestiaCore::RightButton;
}
#endif
if (buttons != 0)
appCore->mouseMove(x - lastX, y - lastY, buttons);