From 1ec792aa61fc7ea78bd0d0e85f2b1c67c975baca Mon Sep 17 00:00:00 2001
From: "mathias.chouet" <mathias.chouet@irstea.fr>
Date: Tue, 27 Aug 2019 16:58:46 +0200
Subject: [PATCH] MacroRugoCompound: fix aprons ids collision

---
 src/app/components/generic-input/generic-input.component.ts | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/app/components/generic-input/generic-input.component.ts b/src/app/components/generic-input/generic-input.component.ts
index e18680906..1afd483b2 100644
--- a/src/app/components/generic-input/generic-input.component.ts
+++ b/src/app/components/generic-input/generic-input.component.ts
@@ -1,7 +1,7 @@
 import { Input, Output, EventEmitter, ChangeDetectorRef, OnChanges, ViewChild } from "@angular/core";
 import { NgModel } from "@angular/forms";
 import { BaseComponent } from "../base/base.component";
-import { isNumeric, Structure, Pab } from "jalhyd";
+import { isNumeric, Structure, Pab, MacrorugoCompound } from "jalhyd";
 import { FormulaireDefinition } from "../../formulaire/definition/form-definition";
 import { NgParameter } from "../../formulaire/ngparam";
 import { I18nService } from "../../services/internationalisation/internationalisation.service";
@@ -46,7 +46,7 @@ export abstract class GenericInputComponent extends BaseComponent implements OnC
                 // if inside a nested Structure, prefix with Structure position
                 // to disambiguate
                 const nub = param.paramDefinition.parentNub;
-                if (nub && (nub instanceof Structure || nub.parent instanceof Pab)) {
+                if (nub && (nub instanceof Structure || nub.parent instanceof Pab || nub.parent instanceof MacrorugoCompound)) {
                     id = nub.findPositionInParent() + "_" + id;
                 }
             }
-- 
GitLab