[Minor] Add Activity.remove(String) to remove an element

This commit is contained in:
Robert von Burg 2017-02-22 10:59:53 +01:00
parent e5f454d57d
commit c62bbe987e
1 changed files with 4 additions and 1 deletions

View File

@ -179,7 +179,10 @@ public class Activity extends GroupedParameterizedElement
* @return the removed element, or null if it does not exist
*/
public IActivityElement remove(String id) {
return this.elements.remove(id);
IActivityElement element = this.elements.remove(id);
if (element != null)
element.setParent(null);
return element;
}
/**