Make scroll-wheel modifier keys consistent in main editor window.

Add constants for the keyboard modifiers that should be used for vertical
zoom, horizontal zoom, and horizontal scrolling in the main editor window,
and use these where appropriate rather than using Keyboard::PrimaryModifier
and friends directly.
This commit is contained in:
Colin Fletcher 2013-06-21 20:13:44 +01:00
parent e6e5aab812
commit 21914c884e
4 changed files with 18 additions and 8 deletions

View file

@ -310,7 +310,7 @@ TimeAxisView::controls_ebox_scroll (GdkEventScroll* ev)
{
switch (ev->direction) {
case GDK_SCROLL_UP:
if (Keyboard::modifier_state_equals (ev->state, Keyboard::TertiaryModifier)) {
if (Keyboard::modifier_state_equals (ev->state, Keyboard::ScrollZoomVerticalModifier)) {
/* See Editor::_stepping_axis_view for notes on this hack */
Editor& e = dynamic_cast<Editor&> (_editor);
if (!e.stepping_axis_view ()) {
@ -325,7 +325,7 @@ TimeAxisView::controls_ebox_scroll (GdkEventScroll* ev)
break;
case GDK_SCROLL_DOWN:
if (Keyboard::modifier_state_equals (ev->state, Keyboard::TertiaryModifier)) {
if (Keyboard::modifier_state_equals (ev->state, Keyboard::ScrollZoomVerticalModifier)) {
/* See Editor::_stepping_axis_view for notes on this hack */
Editor& e = dynamic_cast<Editor&> (_editor);
if (!e.stepping_axis_view ()) {