From a02b7a4635794f8b44a64fe39831c98523f081d2 Mon Sep 17 00:00:00 2001 From: Nupsi Date: Wed, 8 Jun 2022 08:03:48 +0300 Subject: [PATCH] Preserve layer stacking order on copy and paste (#668) Fix Issue#610 Fix Issue#610 by reversing the direction of the copy buffer entry vector. This will preserve the layer ordering and match the behaviour of PasteIntoFolder. --- editor/src/document/portfolio_message_handler.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/editor/src/document/portfolio_message_handler.rs b/editor/src/document/portfolio_message_handler.rs index 638adbcb..c1dc95df 100644 --- a/editor/src/document/portfolio_message_handler.rs +++ b/editor/src/document/portfolio_message_handler.rs @@ -414,7 +414,7 @@ impl MessageHandler for Port responses.push_back(DeselectAllLayers.into()); responses.push_back(StartTransaction.into()); - for entry in data { + for entry in data.iter().rev() { let destination_path = [shallowest_common_folder.to_vec(), vec![generate_uuid()]].concat(); responses.push_front(