File tree 1 file changed +7
-2
lines changed
1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -309,9 +309,14 @@ impl Document {
309
309
Operation :: PasteLayer { path, layer, insert_index } => {
310
310
let folder = self . folder_mut ( path) ?;
311
311
//FIXME: This clone of layer should be avoided somehow
312
- folder. add_layer ( layer. clone ( ) , * insert_index) . ok_or ( DocumentError :: IndexOutOfBounds ) ?;
312
+ let id = folder. add_layer ( layer. clone ( ) , * insert_index) . ok_or ( DocumentError :: IndexOutOfBounds ) ?;
313
+ let path = [ path. clone ( ) , vec ! [ id] ] . concat ( ) ;
313
314
314
- Some ( vec ! [ DocumentResponse :: DocumentChanged , DocumentResponse :: FolderChanged { path: path. clone( ) } ] )
315
+ Some ( vec ! [
316
+ DocumentResponse :: DocumentChanged ,
317
+ DocumentResponse :: SelectLayer { path: path. clone( ) } ,
318
+ DocumentResponse :: FolderChanged { path } ,
319
+ ] )
315
320
}
316
321
Operation :: DuplicateLayer { path } => {
317
322
let layer = self . layer ( & path) ?. clone ( ) ;
You can’t perform that action at this time.
0 commit comments