Commit 3a75ec32 authored by Michael Natterer's avatar Michael Natterer 😴

app: keep the view rotate angle within [0..360[

parent f1b5012f
......@@ -187,6 +187,12 @@ gimp_display_shell_rotate_drag (GimpDisplayShell *shell,
shell->rotate_drag_angle += (angle * 180.0 / G_PI);
if (shell->rotate_drag_angle < 0.0)
shell->rotate_drag_angle += 360;
if (shell->rotate_drag_angle >= 360.0)
shell->rotate_drag_angle -= 360;
if (constrain)
{
shell->rotate_angle = (gint) (((gint) shell->rotate_drag_angle / 15) * 15);
......
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