Commit 866158846d3bbc718a2a9a3794bc47fbd395d66d
1 parent
11b200e3
Exists in
master
and in
72 other branches
Quand on passe d'un panel à l'audre la combobox dim affiche les valeurs entières…
… au lieu des string 'dim1 et 'dim2 => corrigé. Et maintenant une valeur par défaut est séléctionnée pour la combobox type quand on active le bakcground subtracion
Showing
3 changed files
with
9 additions
and
8 deletions
Show diff stats
js/app/models/PlotObjects/PlotObjectConfig.js
@@ -513,7 +513,7 @@ Ext.define('amdaPlotObj.PlotObjectConfig', { | @@ -513,7 +513,7 @@ Ext.define('amdaPlotObj.PlotObjectConfig', { | ||
513 | textinputkey: "background_sub_by_value", | 513 | textinputkey: "background_sub_by_value", |
514 | dimlabel: 'Dim ', | 514 | dimlabel: 'Dim ', |
515 | dimkey: 'background_sub_dim', | 515 | dimkey: 'background_sub_dim', |
516 | - dimNullValue: -1 | 516 | + dimNullValue: "-1" |
517 | } | 517 | } |
518 | }, | 518 | }, |
519 | 519 |
js/app/models/PlotObjects/PlotSpectroObject.js
@@ -33,8 +33,8 @@ Ext.define('amdaPlotObj.PlotSpectroObject', { | @@ -33,8 +33,8 @@ Ext.define('amdaPlotObj.PlotSpectroObject', { | ||
33 | 33 | ||
34 | { name: amdaPlotObj.PlotObjectConfig.bgSubstraction.name, type: 'boolean' }, | 34 | { name: amdaPlotObj.PlotObjectConfig.bgSubstraction.name, type: 'boolean' }, |
35 | { name: amdaPlotObj.PlotObjectConfig.bgSubstraction.type.key, type: 'string' }, | 35 | { name: amdaPlotObj.PlotObjectConfig.bgSubstraction.type.key, type: 'string' }, |
36 | - { name: amdaPlotObj.PlotObjectConfig.bgSubstraction.value.key, type: 'float' }, | ||
37 | - { name: amdaPlotObj.PlotObjectConfig.bgSubstraction.value.dimkey, type: 'int' } | 36 | + { name: amdaPlotObj.PlotObjectConfig.bgSubstraction.value.key, type: 'string' }, |
37 | + { name: amdaPlotObj.PlotObjectConfig.bgSubstraction.value.dimkey, type: 'string' } | ||
38 | ], | 38 | ], |
39 | 39 | ||
40 | constructor: function () { | 40 | constructor: function () { |
@@ -68,7 +68,7 @@ Ext.define('amdaPlotObj.PlotSpectroObject', { | @@ -68,7 +68,7 @@ Ext.define('amdaPlotObj.PlotSpectroObject', { | ||
68 | 68 | ||
69 | this.set(amdaPlotObj.PlotObjectConfig.bgSubstraction.name, false); | 69 | this.set(amdaPlotObj.PlotObjectConfig.bgSubstraction.name, false); |
70 | this.set(amdaPlotObj.PlotObjectConfig.bgSubstraction.type.key, null); | 70 | this.set(amdaPlotObj.PlotObjectConfig.bgSubstraction.type.key, null); |
71 | - this.set(amdaPlotObj.PlotObjectConfig.bgSubstraction.value.key, -1); | 71 | + this.set(amdaPlotObj.PlotObjectConfig.bgSubstraction.value.key, amdaPlotObj.PlotObjectConfig.bgSubstraction.value.dimNullValue); |
72 | this.set(amdaPlotObj.PlotObjectConfig.bgSubstraction.value.dimkey, amdaPlotObj.PlotObjectConfig.bgSubstraction.value.dimNullValue); | 72 | this.set(amdaPlotObj.PlotObjectConfig.bgSubstraction.value.dimkey, amdaPlotObj.PlotObjectConfig.bgSubstraction.value.dimNullValue); |
73 | }, | 73 | }, |
74 | 74 |
js/app/views/PlotComponents/PlotSpectroForm.js
@@ -222,7 +222,7 @@ Ext.define('amdaPlotComp.PlotSpectroForm', { | @@ -222,7 +222,7 @@ Ext.define('amdaPlotComp.PlotSpectroForm', { | ||
222 | const comboBoxV = ref.getForm().findField(amdaPlotObj.PlotObjectConfig.bgSubstraction.value.key); | 222 | const comboBoxV = ref.getForm().findField(amdaPlotObj.PlotObjectConfig.bgSubstraction.value.key); |
223 | 223 | ||
224 | if (newKey === amdaPlotObj.PlotObjectConfig.bgSubstraction.value.dimNullValue) { | 224 | if (newKey === amdaPlotObj.PlotObjectConfig.bgSubstraction.value.dimNullValue) { |
225 | - comboBoxV.setValue(-1); | 225 | + comboBoxV.setValue(amdaPlotObj.PlotObjectConfig.bgSubstraction.value.dimNullValue); |
226 | comboBoxV.setVisible(false); | 226 | comboBoxV.setVisible(false); |
227 | return; | 227 | return; |
228 | } | 228 | } |
@@ -259,9 +259,10 @@ Ext.define('amdaPlotComp.PlotSpectroForm', { | @@ -259,9 +259,10 @@ Ext.define('amdaPlotComp.PlotSpectroForm', { | ||
259 | const field = this.addStandardFieldSet(amdaPlotObj.PlotObjectConfig.bgSubstraction.name, | 259 | const field = this.addStandardFieldSet(amdaPlotObj.PlotObjectConfig.bgSubstraction.name, |
260 | amdaPlotObj.PlotObjectConfig.bgSubstraction.name, this.getBackgroundSubItems(), | 260 | amdaPlotObj.PlotObjectConfig.bgSubstraction.name, this.getBackgroundSubItems(), |
261 | function (name, newKey, oldKey) { | 261 | function (name, newKey, oldKey) { |
262 | - if (newKey !== oldKey) { | ||
263 | - const comboBoxType = ref.getForm().findField(amdaPlotObj.PlotObjectConfig.bgSubstraction.type.key); | ||
264 | - comboBoxType.setValue(null); | 262 | + const comboBoxType = ref.getForm().findField(amdaPlotObj.PlotObjectConfig.bgSubstraction.type.key); |
263 | + comboBoxType.setValue(null); | ||
264 | + if (newKey) { | ||
265 | + comboBoxType.setValue(Object.keys(amdaPlotObj.PlotObjectConfig.bgSubstraction.type.values)[0]); | ||
265 | } | 266 | } |
266 | }); | 267 | }); |
267 | 268 |