mirror of https://github.com/GNOME/gimp.git
app: keep the view rotate angle within [0..360[
This commit is contained in:
parent
f1b5012f23
commit
3a75ec3283
app/display
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue