image/rotation: Fix issuing edit for 0deg rotation

Rotating by 0 degrees went through the complete rotation pipeline including a image reload. Now, 0 deg rotations are ignored.
This commit is contained in:
Sophie Herold 2024-08-06 14:08:24 +02:00
parent 959a047816
commit ea3563493e
2 changed files with 8 additions and 5 deletions

View file

@ -0,0 +1 @@
Rotating by 0 degrees went through the complete rotation pipeline including a image reload. Now, 0 deg rotations are ignored.

View file

@ -103,6 +103,7 @@ impl LpImage {
}
if let Ok(r) = gufo_common::orientation::Rotation::try_from(angle) {
if r != gufo_common::orientation::Rotation::_0 {
log::debug!("Editing image to rotate by {r:?}");
let operation = glycin::Operation::Rotate(r);
let editing_queue = &self.imp().editing_queue;
@ -111,3 +112,4 @@ impl LpImage {
}
}
}
}