@@ -27,7 +27,6 @@ import * as deprecation from './utils/deprecation.js';
2727import * as idGenerator from './utils/idgenerator.js' ;
2828import { deleteVariable , getVariableUsesById } from './variables.js' ;
2929import type { Workspace } from './workspace.js' ;
30- import { WorkspaceSvg } from './workspace_svg.js' ;
3130
3231/**
3332 * Class for a variable map. This contains a dictionary data structure with
@@ -93,9 +92,6 @@ export class VariableMap
9392 } finally {
9493 eventUtils . setGroup ( existingGroup ) ;
9594 }
96- if ( this . workspace instanceof WorkspaceSvg ) {
97- this . workspace . refreshToolboxSelection ( ) ;
98- }
9995 return variable ;
10096 }
10197
@@ -112,9 +108,6 @@ export class VariableMap
112108 if ( ! this . variableMap . has ( newType ) ) {
113109 this . variableMap . set ( newType , newTypeVariables ) ;
114110 }
115- if ( this . workspace instanceof WorkspaceSvg ) {
116- this . workspace . refreshToolboxSelection ( ) ;
117- }
118111 return variable ;
119112 }
120113
@@ -161,9 +154,6 @@ export class VariableMap
161154 for ( let i = 0 ; i < blocks . length ; i ++ ) {
162155 blocks [ i ] . updateVarName ( variable ) ;
163156 }
164- if ( this . workspace instanceof WorkspaceSvg ) {
165- this . workspace . refreshToolboxSelection ( ) ;
166- }
167157 }
168158
169159 /**
@@ -259,9 +249,6 @@ export class VariableMap
259249 this . variableMap . set ( type , variables ) ;
260250 }
261251 eventUtils . fire ( new ( eventUtils . get ( EventType . VAR_CREATE ) ) ( variable ) ) ;
262- if ( this . workspace instanceof WorkspaceSvg ) {
263- this . workspace . refreshToolboxSelection ( ) ;
264- }
265252 return variable ;
266253 }
267254
@@ -279,9 +266,6 @@ export class VariableMap
279266 ) ;
280267 }
281268 this . variableMap . get ( type ) ?. set ( variable . getId ( ) , variable ) ;
282- if ( this . workspace instanceof WorkspaceSvg ) {
283- this . workspace . refreshToolboxSelection ( ) ;
284- }
285269 }
286270
287271 /* Begin functions for variable deletion. */
@@ -310,9 +294,6 @@ export class VariableMap
310294 } finally {
311295 eventUtils . setGroup ( existingGroup ) ;
312296 }
313- if ( this . workspace instanceof WorkspaceSvg ) {
314- this . workspace . refreshToolboxSelection ( ) ;
315- }
316297 }
317298
318299 /**
0 commit comments