Index: sources/gui/qml/dialogs/HeparinRxAdjustment.qml =================================================================== diff -u -r1132f049e169cc87a059261f72fca0ceb7d739f1 -r63d974e3d2d03c93e0398de17bd6ca2d2e039982 --- sources/gui/qml/dialogs/HeparinRxAdjustment.qml (.../HeparinRxAdjustment.qml) (revision 1132f049e169cc87a059261f72fca0ceb7d739f1) +++ sources/gui/qml/dialogs/HeparinRxAdjustment.qml (.../HeparinRxAdjustment.qml) (revision 63d974e3d2d03c93e0398de17bd6ca2d2e039982) @@ -127,22 +127,22 @@ onDidActiveChange: function(vState) { vTreatmentCreate.heparinDispensingRateSet = vState } onDidChange : function(vValue) { if ( ! _heparinDispensingRate.valid ) { vTreatmentCreate.heparinDispensingRateRejectReason = Variables.noRejectReason } - // set heparin time to clear when set OFF to value - if ( ! vTreatmentCreate.heparinDispensingRate && vValue ) { _heparinDeliveryDuration.clear() } - value = vValue + // set heparin time to clear when set OFF to value + if ( value ) { _heparinDeliveryDuration.clear() } + // if set to OFF set heparin stop time 0 - if ( ! vTreatmentCreate.heparinDispensingRate ) { + if ( ! value ) { vTreatmentCreate.heparinDeliveryDurationSet = true - vTreatmentCreate.heparinDeliveryDuration = 0 + _heparinDeliveryDuration.value = 0 } } onIsActiveChanged: { - if ( ! vTreatmentCreate.heparinDispensingRate && isActive ) { + if ( ! value && isActive ) { vTreatmentCreate.heparinDeliveryDurationSet = true - vTreatmentCreate.heparinDeliveryDuration = 0 + _heparinDeliveryDuration.value = 0 } } } @@ -159,7 +159,7 @@ step : vTreatmentRanges.treatmentDurationRes defaultValue : vTreatmentCreate.treatmentDuration value : vTreatmentCreate.heparinDeliveryDuration - enabled : vTreatmentCreate.heparinDispensingRate + enabled : _heparinDispensingRate.value canOff : true isActive : vTreatmentCreate.heparinDeliveryDurationSet onDidActiveChange: function(vState) { vTreatmentCreate.heparinDeliveryDurationSet = vState }