mirror of
https://github.com/bpmn-io/bpmn-js.git
synced 2025-08-26 04:32:44 +08:00
fix(modeling): ensure plane ID change is undoable
related to https://github.com/camunda/camunda-modeler/issues/2750
This commit is contained in:

committed by
fake-join[bot]
![fake-join[bot]](/assets/img/avatar_default.png)
parent
56d38c76fb
commit
bac7d5e1cd
@ -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) {
|
||||
|
Reference in New Issue
Block a user