Skip to content

Commit

Permalink
fixed patternid missing for edited pattern (#165)
Browse files Browse the repository at this point in the history
  • Loading branch information
mhinkie authored Nov 22, 2022
1 parent 796afb5 commit a8ca4b3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ export class CreatePatternRelationComponent implements OnInit {
}
const type = dialogResult.relationType ? dialogResult.relationType : null;
const description = dialogResult.description ? dialogResult.description : null;
dialogResult.firstPattern.id = this.data.callerPatternId;
switch (dialogResult.direction.name) {
case PatternRelationDescriptorDirection.DirectedRight:
return new DirectedEdgeModel(dialogResult.firstPattern, dialogResult.secondPattern, this.data.patternLanguage, description, type,
Expand All @@ -114,6 +115,7 @@ export class CreatePatternRelationComponent implements OnInit {
export interface DialogData {
relationType: string;
description: string;
callerPatternId: string;
firstPattern?: Pattern;
secondPattern?: Pattern;
preselectedEdgeDirection?: PatternRelationDescriptorDirection;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ export class DefaultPatternRendererComponent implements AfterViewInit, OnDestroy

private showAndHandleLinkDialog() {
const dialogRef = this.dialog.open(CreatePatternRelationComponent,
{ data: { firstPattern: this.pattern, patterns: this.patterns } }
{ data: { firstPattern: this.pattern, patterns: this.patterns, callerPatternId: this.patternId } }
);
const dialogSubscription = dialogRef.afterClosed().pipe(
switchMap((edge) => {
Expand Down

0 comments on commit a8ca4b3

Please sign in to comment.