Commit ee1dac0d authored by Georges Basile Stavracas Neto's avatar Georges Basile Stavracas Neto
Browse files

view: Fix scroll-to-zoom direction

The check for the scroll deltas is reversed, correct that. It's worth
noticing that we don't have to care about natural scroll, the values
are reversed when it's enabled.

Also make sure to not zoom out when dy is zero.

Fixes: GNOME/libshumate#4
parent 84a5100b
......@@ -534,9 +534,9 @@ on_scroll_controller_scroll (ShumateView *self,
scroll_latitude = shumate_viewport_widget_y_to_latitude (priv->viewport, GTK_WIDGET (self), priv->current_y);
}
if (dy > 0)
if (dy < 0)
shumate_viewport_zoom_in (priv->viewport);
else
else if (dy > 0)
shumate_viewport_zoom_out (priv->viewport);
if (map_source)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment