From d63e8e7110abb73bfd73659645fe0849a0dbfa7b Mon Sep 17 00:00:00 2001 From: "francois.grand" <francois.grand@irstea.fr> Date: Tue, 17 Apr 2018 15:22:29 +0200 Subject: [PATCH] =?UTF-8?q?=20#77=20suppression=20du=20m=C3=A9canisme=20de?= =?UTF-8?q?=20clonage=20des=20conditions=20de=20d=C3=A9pendance?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/formulaire/dependency/dependency-condition.ts | 4 ---- src/app/formulaire/dependency/dependency.ts | 2 -- .../formulaire/dependency/existence-dependency-condition.ts | 4 ---- src/app/formulaire/dependency/existence-dependency.ts | 4 ---- src/app/formulaire/dependency/value-dependency-condition.ts | 4 ---- src/app/formulaire/dependency/value-dependency.ts | 4 ---- 6 files changed, 22 deletions(-) diff --git a/src/app/formulaire/dependency/dependency-condition.ts b/src/app/formulaire/dependency/dependency-condition.ts index 28480a1ad..876e46426 100644 --- a/src/app/formulaire/dependency/dependency-condition.ts +++ b/src/app/formulaire/dependency/dependency-condition.ts @@ -13,8 +13,4 @@ export class DependencyCondition { public toString(): string { return "cond=" + DependencyConditionType[this._type]; } - - public clone(): DependencyCondition { - throw new Error("la méthode DependencyCondition.clone() doit être redéfinie !") - } } diff --git a/src/app/formulaire/dependency/dependency.ts b/src/app/formulaire/dependency/dependency.ts index aa2a1bc09..c3db2e55d 100644 --- a/src/app/formulaire/dependency/dependency.ts +++ b/src/app/formulaire/dependency/dependency.ts @@ -27,6 +27,4 @@ export abstract class Dependency { public toString(): string { return "master=" + this._master.toString() + "\n " + this._masterCondition.toString(); } - - public abstract clone(master: FormulaireElement): Dependency; } diff --git a/src/app/formulaire/dependency/existence-dependency-condition.ts b/src/app/formulaire/dependency/existence-dependency-condition.ts index 9a60f25b3..0ec4ce094 100644 --- a/src/app/formulaire/dependency/existence-dependency-condition.ts +++ b/src/app/formulaire/dependency/existence-dependency-condition.ts @@ -5,8 +5,4 @@ export class ExistenceDependencyCondition extends DependencyCondition { constructor() { super(DependencyConditionType.IsDisplayed); } - - public clone(): ExistenceDependencyCondition { - return new ExistenceDependencyCondition(); - } } diff --git a/src/app/formulaire/dependency/existence-dependency.ts b/src/app/formulaire/dependency/existence-dependency.ts index 20f0e4f57..0f8aecec3 100644 --- a/src/app/formulaire/dependency/existence-dependency.ts +++ b/src/app/formulaire/dependency/existence-dependency.ts @@ -14,8 +14,4 @@ export class ExistenceDependency extends Dependency { public toString() { return "existdep\n " + super.toString(); } - - public clone(master: FormulaireElement): Dependency { - return new ExistenceDependency(master, this.masterCondition.clone()); - } } diff --git a/src/app/formulaire/dependency/value-dependency-condition.ts b/src/app/formulaire/dependency/value-dependency-condition.ts index 8ba997c9d..b0e309568 100644 --- a/src/app/formulaire/dependency/value-dependency-condition.ts +++ b/src/app/formulaire/dependency/value-dependency-condition.ts @@ -13,8 +13,4 @@ export class ValueDependencyCondition extends DependencyCondition { public toString(): string { return super.toString() + " " + this._value; } - - public clone(): ValueDependencyCondition { - return new ValueDependencyCondition(this._value); - } } diff --git a/src/app/formulaire/dependency/value-dependency.ts b/src/app/formulaire/dependency/value-dependency.ts index c973ecd6c..7b95b83d6 100644 --- a/src/app/formulaire/dependency/value-dependency.ts +++ b/src/app/formulaire/dependency/value-dependency.ts @@ -15,8 +15,4 @@ export class ValueDependency extends Dependency { public toString() { return "valdep\n " + super.toString() + "\n slave val " + this.slaveValue; } - - public clone(master: FormulaireElement): Dependency { - return new ValueDependency(master, this.masterCondition.clone()); - } } -- GitLab