Skip to content

Commit

Permalink
Fix conflicting amendment projection (#2887)
Browse files Browse the repository at this point in the history
  • Loading branch information
bastianjoel authored Oct 23, 2023
1 parent beb883e commit f59c0bf
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import {
} from 'src/app/site/pages/meetings/pages/motions/modules/change-recommendations/services';
import { MotionControllerService } from 'src/app/site/pages/meetings/pages/motions/services/common/motion-controller.service';
import { MotionFormatService } from 'src/app/site/pages/meetings/pages/motions/services/common/motion-format.service';
import { MotionLineNumberingService } from 'src/app/site/pages/meetings/pages/motions/services/common/motion-line-numbering.service';
import { ViewMotionAmendedParagraph } from 'src/app/site/pages/meetings/pages/motions/view-models/view-motion-amended-paragraph';
import { SlideData } from 'src/app/site/pages/meetings/pages/projectors/definitions';
import { MeetingSettingsService } from 'src/app/site/pages/meetings/services/meeting-settings.service';
Expand Down Expand Up @@ -159,7 +158,6 @@ export class MotionSlideComponent
public constructor(
protected override translate: TranslateService,
motionRepo: MotionControllerService,
private motionLineNumbering: MotionLineNumberingService,
private motionFormatService: MotionFormatService,
private changeRepo: MotionChangeRecommendationControllerService,
private lineNumbering: LineNumberingService,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,21 +223,25 @@ export class MotionFormatService {
firstLine
});

let lastLineTo = -1;
for (let i = 0; i < changesToShow.length; i++) {
text.push(
this.diffService.extractMotionLineRange(
motionText,
{
from: i === 0 ? firstLine : changesToShow[i - 1].getLineTo() + 1,
to: changesToShow[i].getLineFrom() - 1
},
true,
lineLength,
highlightedLine
)
);
if (changesToShow[i].getLineTo() > lastLineTo) {
text.push(
this.diffService.extractMotionLineRange(
motionText,
{
from: i === 0 ? firstLine : changesToShow[i - 1].getLineTo() + 1,
to: changesToShow[i].getLineFrom() - 1
},
true,
lineLength,
highlightedLine
)
);
}

text.push(this.diffService.getChangeDiff(motionText, changesToShow[i], lineLength, highlightedLine));
lastLineTo = changesToShow[i].getLineTo();
}

text.push(
Expand Down

0 comments on commit f59c0bf

Please sign in to comment.