From acd046e4b3e0644530b38e17e134b7a966faaf3e Mon Sep 17 00:00:00 2001 From: Dima <36787146+dimaaan21@users.noreply.github.com> Date: Wed, 19 Apr 2023 18:11:21 +0300 Subject: [PATCH] fix: block_svg disable/enable ops lead to unsync state and render (#6989) * fix: disable/enable block_svg downstream blocks * fix: disable/enable block_svg improve --- core/block_svg.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/core/block_svg.ts b/core/block_svg.ts index 7851c1472..504bff63f 100644 --- a/core/block_svg.ts +++ b/core/block_svg.ts @@ -947,7 +947,12 @@ export class BlockSvg extends Block implements IASTNodeLocationSvg, */ updateDisabled() { const disabled = !this.isEnabled() || this.getInheritedDisabled(); - if (this.visuallyDisabled === disabled) return; + + if (this.visuallyDisabled === disabled) { + this.getNextBlock()?.updateDisabled(); + return; + } + this.applyColour(); this.visuallyDisabled = disabled; for (const child of this.getChildren(false)) {