fix: Wrap toolbox refreshes in a timeout when modifying variables (#8980)

This commit is contained in:
RoboErikG
2025-05-06 10:58:05 -07:00
committed by GitHub
parent 233604a74a
commit 04a31f950f
5 changed files with 21 additions and 27 deletions

View File

@@ -21,7 +21,6 @@ import '../core/field_label.js';
import {FieldVariable} from '../core/field_variable.js';
import {Msg} from '../core/msg.js';
import * as Variables from '../core/variables.js';
import type {WorkspaceSvg} from '../core/workspace_svg.js';
/**
* A dictionary of the block definitions provided by this module.
@@ -170,7 +169,6 @@ const deleteOptionCallbackFactory = function (
if (variable) {
Variables.deleteVariable(variable.getWorkspace(), variable, block);
}
(block.workspace as WorkspaceSvg).refreshToolboxSelection();
};
};

View File

@@ -22,7 +22,6 @@ import '../core/field_label.js';
import {FieldVariable} from '../core/field_variable.js';
import {Msg} from '../core/msg.js';
import * as Variables from '../core/variables.js';
import type {WorkspaceSvg} from '../core/workspace_svg.js';
/**
* A dictionary of the block definitions provided by this module.
@@ -181,7 +180,6 @@ const deleteOptionCallbackFactory = function (block: VariableBlock) {
if (variable) {
Variables.deleteVariable(variable.getWorkspace(), variable, block);
}
(block.workspace as WorkspaceSvg).refreshToolboxSelection();
};
};