Skip to content
Snippets Groups Projects
Commit 60386354 authored by Dorchies David's avatar Dorchies David
Browse files

Merge branch...

Merge branch '537-le-passage-en-mode-varier-devrait-systematiquement-ouvrir-la-boite-de-dialogue' into 'devel'

Resolve "Le passage en mode varier devrait systématiquement ouvrir la boite de dialogue"

Closes #537

See merge request !143
parents bd0f3a13 04c6c29b
No related branches found
No related tags found
1 merge request!143Resolve "Le passage en mode varier devrait systématiquement ouvrir la boite de dialogue"
Pipeline #139572 passed
......@@ -256,10 +256,14 @@ export class ParamFieldLineComponent implements OnChanges {
if (oldValueMode !== ParamValueMode.MINMAX && oldValueMode !== ParamValueMode.LISTE) {
this.param.valueMode = ParamValueMode.MINMAX; // min/max par défaut
}
if (this._paramValuesComponent) {
// re-open modal when clicking the "var" mode button again (PoLS)
this._paramValuesComponent.openDialog();
}
// let framework create ParamValuesComponent instance and open dialog
setTimeout(() => {
if (this._paramValuesComponent) {
// re-open modal when clicking the "var" mode button again (PoLS)
this._paramValuesComponent.openDialog();
}
}, 100);
break;
case "cal":
......
......@@ -76,14 +76,6 @@ export class ParamValuesComponent implements AfterViewInit, Observer {
}
public ngAfterViewInit() {
// open dialog when switching to this mode, but only the first time this component is built,
// otherwise switching back from another calc tab will trigger the dialog again
if (this.param.valueMode === ParamValueMode.MINMAX && this.param.minValue === undefined) {
// use Promise trick to introduce a pseudo-timeout and avoid ExpressionChangedAfterItHasBeenCheckedError
Promise.resolve().then(() => {
this.openDialog();
});
}
// subscribe to parameter values change (through dialog actions)
this.param.addObserver(this);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment