Skip to content

Commit 81006e5

Browse files
committed
Remove unnecessary code now that we reload on language change
1 parent 7f53299 commit 81006e5

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

src/reactComponents/BlocklyComponent.tsx

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -165,23 +165,6 @@ const BlocklyComponent = React.forwardRef<BlocklyComponentType | null, BlocklyCo
165165
if (props.onWorkspaceRecreated) {
166166
props.onWorkspaceRecreated(workspaceRef.current);
167167
}
168-
169-
// Small delay to ensure toolbox is rebuilt before restoring blocks
170-
setTimeout(() => {
171-
if (workspaceRef.current && workspaceXml.hasChildNodes()) {
172-
Blockly.Xml.domToWorkspace(workspaceXml, workspaceRef.current);
173-
}
174-
175-
// Final refresh
176-
const toolbox = workspaceRef.current!.getToolbox();
177-
if (toolbox && toolbox.refreshSelection) {
178-
toolbox.refreshSelection();
179-
}
180-
181-
if (workspaceRef.current) {
182-
Blockly.svgResize(workspaceRef.current);
183-
}
184-
}, 10);
185168
};
186169

187170
/** Initializes the Blockly workspace. */

0 commit comments

Comments
 (0)