Index: sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentPressuresLimits.qml =================================================================== diff -u -rbea36be2766046e63c4e82539a630b5cee7ce1c6 -r9c2a4c5abe3a93c3b3a7ed3d6fd9e12f0c161b3c --- sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentPressuresLimits.qml (.../TreatmentAdjustmentPressuresLimits.qml) (revision bea36be2766046e63c4e82539a630b5cee7ce1c6) +++ sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentPressuresLimits.qml (.../TreatmentAdjustmentPressuresLimits.qml) (revision 9c2a4c5abe3a93c3b3a7ed3d6fd9e12f0c161b3c) @@ -35,6 +35,11 @@ readonly property alias venousPressureLimitAsymtrc : _venousAsymmetricWindow.value readonly property alias tmpLimitWindow : _tmpWindow.value + readonly property bool isValid : _arterialWindow.valid && + _venousWindow.valid && + _venousAsymmetricWindow.valid && + _tmpWindow.valid + titleText: qsTr("Pressure Window Limit Settings") height : Variables.smallDialogHeight width : Variables.smallDialogWidth @@ -79,8 +84,12 @@ minimum : vTreatmentPressureOcclusion.arterialMin maximum : vTreatmentPressureOcclusion.arterialMax step : vTreatmentRanges.arterialPressureLimitWindowRes + valid : ! vTreatmentAdjustmentPressuresLimits.arterialPressureLimitWindowRejectionReason - onDidChange : function(vValue) { value = vValue } + onDidChange : function(vValue) { + if ( ! _arterialWindow.valid ) { vTreatmentAdjustmentPressuresLimits.arterialPressureLimitWindowRejectionReason = Variables.noRejectReason } + value = vValue + } } LabelUnitValueAdjuster { id: _venousWindow @@ -93,8 +102,12 @@ minimum : vTreatmentPressureOcclusion.venousMin maximum : vTreatmentPressureOcclusion.venousMax step : vTreatmentRanges.venousPressureLimitWindowRes + valid : ! vTreatmentAdjustmentPressuresLimits.venousPressureLimitWindowRejectionReason - onDidChange : function(vValue) { value = vValue } + onDidChange : function(vValue) { + if ( ! _venousWindow.valid ) { vTreatmentAdjustmentPressuresLimits.venousPressureLimitWindowRejectionReason = Variables.noRejectReason } + value = vValue + } } LabelUnitValueAdjuster { id: _venousAsymmetricWindow @@ -107,8 +120,12 @@ minimum : vTreatmentRanges.venousPressureLimitAsymtrcMin maximum : vTreatmentRanges.venousPressureLimitAsymtrcMax step : vTreatmentRanges.venousPressureLimitAsymtrcRes + valid : ! vTreatmentAdjustmentPressuresLimits.venousPressureLimitAsymtrcRejectionReason - onDidChange : function(vValue) { value = vValue } + onDidChange : function(vValue) { + if ( ! _venousAsymmetricWindow.valid ) { vTreatmentAdjustmentPressuresLimits.venousPressureLimitAsymtrcRejectionReason = Variables.noRejectReason } + value = vValue + } } LabelUnitValueAdjuster { id: _tmpWindow @@ -121,8 +138,12 @@ minimum : vTreatmentPressureOcclusion.tmpMin maximum : vTreatmentPressureOcclusion.tmpMax step : vTreatmentRanges.transmembranePressureLimitWindowRes + valid : ! vTreatmentAdjustmentPressuresLimits.tmpPressureLimitWindowRejectionReason - onDidChange : function(vValue) { value = vValue } + onDidChange : function(vValue) { + if ( ! _tmpWindow.valid ) { vTreatmentAdjustmentPressuresLimits.tmpPressureLimitWindowRejectionReason = Variables.noRejectReason } + value = vValue + } } } } @@ -141,6 +162,7 @@ font.weight : Font.Medium } isDefault : true + enabled : _root.isValid onClicked : { _root.confirmClicked()