public void deattach() {
deactivate();
startComponent = null;
- nodeMap.commit("Route pipe");
+
deattachUI();
super.deattach();
panel.refresh();
state = ToolState.SELECTING_SPLIT;
}
public void deactivate() {
- for (PipelineComponent component : added) {
- component.getControlPoint().setDeletable(true);
- }
+ if (added.size() > 0) {
+ for (PipelineComponent component : added) {
+ component.getControlPoint().setDeletable(true);
+ }
+
+ for (PipelineComponent comp : added) {
+ PipingRules.requestUpdate(comp.getControlPoint());
+ }
+ try {
+ PipingRules.update();
+ nodeMap.commit("Route pipe");
+ } catch (Exception e) {
+ ExceptionUtils.logAndShowError(e);
+ }
+ added.clear();
+ }
- added.clear();
startComponent.getControlPoint().setDeletable(startRemovable);
direction = null;