File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ export const MirrorModeling = {
3939 let element_before_snapshot ;
4040
4141 if ( mirror_element == original ) return ;
42+ if ( mirror_element && ! Outliner . elements . includes ( mirror_element ) ) return ;
4243
4344 if ( mirror_element ) {
4445 element_before_snapshot = mirror_element . getUndoCopy ( undo_aspects ) ;
@@ -345,7 +346,7 @@ Blockbench.on('finish_edit', ({aspects}) => {
345346 }
346347 if ( is_centered ) {
347348 let mirror_element = cached_data ?. counterpart ;
348- if ( mirror_element && mirror_element . uuid != element . uuid ) {
349+ if ( mirror_element && Outliner . elements . includes ( mirror_element ) && mirror_element . uuid != element . uuid ) {
349350 MirrorModeling . insertElementIntoUndo ( mirror_element , Undo . current_save . aspects , mirror_element . getUndoCopy ( ) ) ;
350351 mirror_element . remove ( ) ;
351352 aspects . elements . remove ( mirror_element ) ;
@@ -364,7 +365,7 @@ Blockbench.on('finish_edit', ({aspects}) => {
364365
365366 selected_groups . forEach ( group => {
366367 let mirror_group = MirrorModeling . cached_elements [ group . uuid ] ?. counterpart ;
367- if ( mirror_group ) {
368+ if ( mirror_group && Group . all . includes ( mirror_group ) ) {
368369 MirrorModeling . updateParentNodeCounterpart ( mirror_group , group ) ;
369370 }
370371 } )
You can’t perform that action at this time.
0 commit comments