Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
nghyd
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
⚠️
A compter du 1er avril, attention à vos pipelines :
Nouvelles limitations de Docker Hub
Show more breadcrumbs
Cassiopée
nghyd
Commits
c88385a9
Commit
c88385a9
authored
2 years ago
by
François Grand
Browse files
Options
Downloads
Patches
Plain Diff
fix: reset results when application settings are modified (max iterations, compute precision)
refs
#574
parent
08099bc0
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/app/formulaire/definition/form-definition.ts
+7
-1
7 additions, 1 deletion
src/app/formulaire/definition/form-definition.ts
src/app/services/app-setup.service.ts
+4
-8
4 additions, 8 deletions
src/app/services/app-setup.service.ts
with
11 additions
and
9 deletions
src/app/formulaire/definition/form-definition.ts
+
7
−
1
View file @
c88385a9
...
...
@@ -10,7 +10,8 @@ import {
ParamDefinition
,
Result
,
VariatedDetails
,
Prop_NullParameters
Prop_NullParameters
,
SessionSettings
}
from
"
jalhyd
"
;
import
{
FormulaireElement
}
from
"
../elements/formulaire-element
"
;
...
...
@@ -67,6 +68,7 @@ export abstract class FormulaireDefinition extends FormulaireNode implements Obs
constructor
(
parent
?:
FormulaireNode
)
{
super
(
parent
);
SessionSettings
.
instance
.
addObserver
(
this
);
}
// surcharge de FormulaireNode::get:uid()
...
...
@@ -421,6 +423,10 @@ export abstract class FormulaireDefinition extends FormulaireNode implements Obs
break
;
}
}
else
if
(
sender
instanceof
SessionSettings
)
{
// reset results if a session setting (max iterations, compute precision) has been modified
this
.
reset
();
}
}
/**
...
...
This diff is collapsed.
Click to expand it.
src/app/services/app-setup.service.ts
+
4
−
8
View file @
c88385a9
...
...
@@ -20,31 +20,27 @@ export class ApplicationSetupService extends Observable {
// default builtin values
public
displayPrecision
=
3
;
private
_c
omputePrecision
=
1
e
-
7
;
// tied to model
private
_m
axIterations
=
100
;
// tied to model
private
static
readonly
_defaultC
omputePrecision
=
1
e
-
7
;
// tied to model
private
static
readonly
_defaultM
axIterations
=
100
;
// tied to model
public
enableNotifications
=
true
;
public
enableHotkeys
=
false
;
private
_enableEmptyFieldsOnFormInit
=
true
;
private
_foldedMessageLog
=
false
;
public
set
computePrecision
(
p
:
number
)
{
this
.
_computePrecision
=
p
;
// forward to model
SessionSettings
.
precision
=
p
;
}
public
get
computePrecision
():
number
{
return
this
.
_computeP
recision
;
return
SessionSettings
.
p
recision
;
}
public
set
maxIterations
(
m
:
number
)
{
this
.
_maxIterations
=
m
;
// forward to model
SessionSettings
.
maxIterations
=
m
;
}
public
get
maxIterations
():
number
{
return
thi
s
.
_
maxIterations
;
return
SessionSetting
s
.
maxIterations
;
}
public
get
enableEmptyFieldsOnFormInit
()
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment