fix(modeling): ensure plane ID change is undoable

related to https://github.com/camunda/camunda-modeler/issues/2750
This commit is contained in:
Martin Stamm
2022-02-14 14:20:29 +01:00
committed by fake-join[bot]
parent 56d38c76fb
commit bac7d5e1cd
2 changed files with 112 additions and 23 deletions

View File

@ -216,7 +216,7 @@ export default function SubProcessPlaneBehavior(
this.reverted('element.updateProperties', function(context) {
var shape = context.element;
if (!isCollapsedSubProcess(shape)) {
if (!is(shape, 'bpmn:SubProcess')) {
return;
}
@ -230,6 +230,13 @@ export default function SubProcessPlaneBehavior(
return;
}
if (isPlane(shape)) {
elementRegistry.updateId(shape, toPlaneId(oldId));
elementRegistry.updateId(newId, oldId);
return;
}
var planeElement = elementRegistry.get(toPlaneId(newId));
if (!planeElement) {