correct OR when checking modifiers

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34974 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Stephan Witt 2010-07-18 12:18:22 +00:00
parent 7441f370c0
commit 0498aa1dcb

View File

@ -821,15 +821,15 @@ void GuiWorkArea::wheelEvent(QWheelEvent * ev)
switch (lyxrc.scroll_whell_zoom) { switch (lyxrc.scroll_whell_zoom) {
case LyXRC::SCROLL_WHEEL_ZOOM_CTRL: case LyXRC::SCROLL_WHEEL_ZOOM_CTRL:
zoom = ev->modifiers() & Qt::ControlModifier; zoom = ev->modifiers() & Qt::ControlModifier;
zoom &= !(ev->modifiers() & (Qt::ShiftModifier || Qt::AltModifier)); zoom &= !(ev->modifiers() & (Qt::ShiftModifier | Qt::AltModifier));
break; break;
case LyXRC::SCROLL_WHEEL_ZOOM_SHIFT: case LyXRC::SCROLL_WHEEL_ZOOM_SHIFT:
zoom = ev->modifiers() & Qt::ShiftModifier; zoom = ev->modifiers() & Qt::ShiftModifier;
zoom &= !(ev->modifiers() & (Qt::ControlModifier || Qt::AltModifier)); zoom &= !(ev->modifiers() & (Qt::ControlModifier | Qt::AltModifier));
break; break;
case LyXRC::SCROLL_WHEEL_ZOOM_ALT: case LyXRC::SCROLL_WHEEL_ZOOM_ALT:
zoom = ev->modifiers() & Qt::AltModifier; zoom = ev->modifiers() & Qt::AltModifier;
zoom &= !(ev->modifiers() & (Qt::ShiftModifier || Qt::ControlModifier)); zoom &= !(ev->modifiers() & (Qt::ShiftModifier | Qt::ControlModifier));
break; break;
case LyXRC::SCROLL_WHEEL_ZOOM_OFF: case LyXRC::SCROLL_WHEEL_ZOOM_OFF:
break; break;