Skip to content

Commit

Permalink
Merge pull request #6918 from BeksOmega/fix/mutator-rerender
Browse files Browse the repository at this point in the history
fix: remove forced rerender from mutator
  • Loading branch information
BeksOmega authored Apr 5, 2023
2 parents 2bf456d + d897cdc commit 25c6d47
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions core/mutator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -460,21 +460,7 @@ export class Mutator extends Icon {
const block = this.getBlock();
const oldExtraState = BlockChange.getExtraBlockState_(block);

// Switch off rendering while the source block is rebuilt.
const savedRendered = block.rendered;
// TODO(#4288): We should not be setting the rendered property to false.
block.rendered = false;

// Allow the source block to rebuild itself.
block.compose!(this.rootBlock);
// Restore rendering and show the changes.
block.rendered = savedRendered;
// Mutation may have added some elements that need initializing.
block.initSvg();

if (block.rendered) {
block.render();
}

const newExtraState = BlockChange.getExtraBlockState_(block);
if (oldExtraState !== newExtraState) {
Expand Down

0 comments on commit 25c6d47

Please sign in to comment.