fix: undoing and redoing deleting procedures (#6722)

* fix: undoing and redoing deleting procedure defs

* chore: added tests for undoing and redoing procedure def deletes

* fix: dragging blocks from flyout

* chore: PR comments

* chore: fixup from rebase
This commit is contained in:
Beka Westberg
2023-01-07 00:02:45 +00:00
committed by GitHub
parent 23fb76b9f2
commit d27f7c81b4
3 changed files with 48 additions and 4 deletions

View File

@@ -193,7 +193,9 @@ export function rename(this: Field, name: string): string {
name = name.trim();
const legalName = findLegalName(name, block);
if (isProcedureBlock(block)) block.getProcedureModel().setName(legalName);
if (isProcedureBlock(block) && !block.isInsertionMarker()) {
block.getProcedureModel().setName(legalName);
}
const oldName = this.getValue();
if (oldName !== name && oldName !== legalName) {
// Rename any callers.