Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Disable newly created function call blocks when the corresponding definition is disabled. #8665

Merged
merged 1 commit into from
Dec 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions blocks/procedures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1099,6 +1099,14 @@ const PROCEDURE_CALL_COMMON = {
xml.appendChild(block);
Xml.domToWorkspace(xml, this.workspace);
Events.setGroup(false);
} else if (!def.isEnabled()) {
this.setDisabledReason(
true,
DISABLED_PROCEDURE_DEFINITION_DISABLED_REASON,
);
this.setWarningText(
Msg['PROCEDURES_CALL_DISABLED_DEF_WARNING'].replace('%1', name),
);
}
} else if (event.type === Events.BLOCK_DELETE) {
// Look for the case where a procedure definition has been deleted,
Expand Down
Loading