app: update the tool's state after the wheel controller has handled the event

This commit is contained in:
Michael Natterer 2011-04-06 22:50:20 +02:00
parent febc1da4be
commit 7fae1b3c50
1 changed files with 59 additions and 60 deletions

View File

@ -709,17 +709,15 @@ gimp_display_shell_canvas_tool_events (GtkWidget *canvas,
case GDK_SCROLL:
{
GdkEventScroll *sevent = (GdkEventScroll *) event;
GdkScrollDirection direction;
GimpController *wheel;
wheel = gimp_controllers_get_wheel (gimp);
if (wheel &&
gimp_controller_wheel_scroll (GIMP_CONTROLLER_WHEEL (wheel),
if (! wheel ||
! gimp_controller_wheel_scroll (GIMP_CONTROLLER_WHEEL (wheel),
sevent))
return TRUE;
direction = sevent->direction;
{
GdkScrollDirection direction = sevent->direction;
if (state & GDK_CONTROL_MASK)
{
@ -782,6 +780,7 @@ gimp_display_shell_canvas_tool_events (GtkWidget *canvas,
gtk_adjustment_set_value (adj, value);
}
}
gimp_display_shell_untransform_event_coords (shell,
&display_coords,