We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0a58a79 commit c2fd444Copy full SHA for c2fd444
src/app/services/data/trainrunsection.service.ts
@@ -1033,10 +1033,13 @@ export class TrainrunSectionService implements OnDestroy {
1033
if (!node.isEmpty()) break;
1034
if (!node.isNonStopNode() && node.getIsCollapsed()) {
1035
// undock the empty node of the trainrun
1036
- this.nodeService.undockTransition(
+ const mergedSection = this.nodeService.undockTransition(
1037
node.getId(),
1038
node.getTransition(trainrunSection.getId()).getId(),
1039
);
1040
+ if (mergedSection) {
1041
+ mergedSection.setNumberOfStops(Math.max(0, mergedSection.getNumberOfStops() - 1));
1042
+ }
1043
// remove node only if it is not used anymore
1044
if (node.getTransitions().length === 0) {
1045
// unselect details
0 commit comments