This should reduce the amount of unsynchronised changes
gitlab #35
Change-Id: I5834089a3f7d0e150e46d6cb6b8f53d058ef7ec8
public void deattach() {
deactivate();
startComponent = null;
public void deattach() {
deactivate();
startComponent = null;
- nodeMap.commit("Route pipe");
deattachUI();
super.deattach();
panel.refresh();
deattachUI();
super.deattach();
panel.refresh();
state = ToolState.SELECTING_SPLIT;
}
public void deactivate() {
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();
+ }
startComponent.getControlPoint().setDeletable(startRemovable);
direction = null;
startComponent.getControlPoint().setDeletable(startRemovable);
direction = null;