Fix regression causing pasted images to have a zero-size transform (#2238)

* Use the identity matrix as the default for an image frame

* Fix all usages to be equivalent to their pre-refactor versions, opting to keep ZERO not IDENTITY as the default image size

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
James Lindsay
2025-01-29 21:09:02 +00:00
committed by GitHub
parent dbf917ef71
commit c5a3c32114
5 changed files with 10 additions and 5 deletions

View File

@@ -767,7 +767,11 @@ impl MessageHandler<DocumentMessage, DocumentMessageData<'_>> for DocumentMessag
responses.add(DocumentMessage::AddTransaction);
let image_frame = ImageFrame { image, ..Default::default() };
let image_frame = ImageFrame {
image,
transform: DAffine2::IDENTITY,
alpha_blending: Default::default(),
};
let layer = graph_modification_utils::new_image_layer(image_frame, layer_node_id, self.new_layer_parent(true), responses);
if let Some(name) = name {