Index: sources/gui/qml/pages/pretreatment/create/PreTreatmentCreate.qml =================================================================== diff -u -r2ad0fc5c1215088ee0e4ea7f9b2bc367c4ed2fd9 -r1a614320ec16b956d14c644ac2e90833f5cbdbcf --- sources/gui/qml/pages/pretreatment/create/PreTreatmentCreate.qml (.../PreTreatmentCreate.qml) (revision 2ad0fc5c1215088ee0e4ea7f9b2bc367c4ed2fd9) +++ sources/gui/qml/pages/pretreatment/create/PreTreatmentCreate.qml (.../PreTreatmentCreate.qml) (revision 1a614320ec16b956d14c644ac2e90833f5cbdbcf) @@ -218,7 +218,26 @@ vTreatmentCreate.treatmentDuration = value } } + Connections { target: _duration + function onValueChanged ( ) { + if ( _heparinDispensingRateSwitch.checked ) { + // FIXME: LEAHI + //////////////////////////////////////////////////////////////// + // depending on the feedback the approach could be differnet. // + //////////////////////////////////////////////////////////////// + + //A: Deactive the hheparin stop time and let the usere re-set the value + _heparinStopTime.active = false + + //B: Leave the set value on heparin stop time and just fix if exceeds max. + if ( _heparinStopTime.value > _duration.value ) { + _heparinStopTime.reset( _duration.value ) + } + } + } + } + Connections { target : _heparinDispensingRateSwitch function onActiveChanged ( ) { let mActive = _heparinDispensingRateSwitch.active @@ -409,8 +428,8 @@ flickable : _flickable unit : Variables.unitTextDuration minimum : vTreatmentRanges.heparinStopTimeMin - maximum : vTreatmentRanges.heparinStopTimeMax - step : vTreatmentRanges.heparinStopTimeRes + maximum : _duration.value // vTreatmentRanges.heparinStopTimeMax // this maximum depends on the Treatment Duration Value. + step : _duration.step // vTreatmentRanges.heparinStopTimeRes defaultValue: vTreatmentRanges.heparinStopTimeDef valid : !vTreatmentCreate.heparinStopTimeRejectReason enabled : false // this switch depends on the heparin dispencing