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:
parent
959a047816
commit
ea3563493e
2 changed files with 8 additions and 5 deletions
1
news.d/47.rc/fixed-dont-rewrite-image-for-0deg-rotation
Normal file
1
news.d/47.rc/fixed-dont-rewrite-image-for-0deg-rotation
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
Rotating by 0 degrees went through the complete rotation pipeline including a image reload. Now, 0 deg rotations are ignored.
|
||||||
|
|
@ -103,11 +103,13 @@ impl LpImage {
|
||||||
}
|
}
|
||||||
|
|
||||||
if let Ok(r) = gufo_common::orientation::Rotation::try_from(angle) {
|
if let Ok(r) = gufo_common::orientation::Rotation::try_from(angle) {
|
||||||
log::debug!("Editing image to rotate by {r:?}");
|
if r != gufo_common::orientation::Rotation::_0 {
|
||||||
let operation = glycin::Operation::Rotate(r);
|
log::debug!("Editing image to rotate by {r:?}");
|
||||||
let editing_queue = &self.imp().editing_queue;
|
let operation = glycin::Operation::Rotate(r);
|
||||||
editing_queue.push(operation);
|
let editing_queue = &self.imp().editing_queue;
|
||||||
editing_queue.write_to_image(self);
|
editing_queue.push(operation);
|
||||||
|
editing_queue.write_to_image(self);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue