Index: sources/gui/qml/dialogs/AcidConcentrateAdjustment.qml =================================================================== diff -u -r7d2122a9a4330ebc2ff4c22be36f32e9a82417ec -rda2dbdbd92d099e44d11bbfb2b794d5ee19a0f0a --- sources/gui/qml/dialogs/AcidConcentrateAdjustment.qml (.../AcidConcentrateAdjustment.qml) (revision 7d2122a9a4330ebc2ff4c22be36f32e9a82417ec) +++ sources/gui/qml/dialogs/AcidConcentrateAdjustment.qml (.../AcidConcentrateAdjustment.qml) (revision da2dbdbd92d099e44d11bbfb2b794d5ee19a0f0a) @@ -35,10 +35,10 @@ width : 1000 height : 600 padding : Variables.defaultMargin - showGradient : true + onVisibleChanged: notificationText = "" - contentItem: Item { id : _contentItem - width: _root.width + Item { id : _contentItem + anchors.fill: parent TitleText { id: _titleText anchors { @@ -76,7 +76,7 @@ width : _root.controlWidth height : _root.controlHeight - contentItem : ValueControl { id: _potassiumVolumeControl + contentItem : ValueAdjuster{ id: _potassiumVolumeControl minimum : Variables.potassiumMin // TODO: NR - Update to .conf values when available maximum : Variables.potassiumMax // LEAHI-PRS-660 , LEAHI-PRS-241 step : Variables.potassiumResolution @@ -97,7 +97,7 @@ width : _root.controlWidth height : _root.controlHeight - contentItem : ValueControl { id: _calciumVolumeControl + contentItem : ValueAdjuster { id: _calciumVolumeControl minimum : Variables.calciumMin // TODO: NR - Update to .conf values when available maximum : Variables.calciumMax // LEAHI-PRS-660 , LEAHI-PRS-241 step : Variables.calciumResolution @@ -109,7 +109,7 @@ TouchRect { id : _saveButton anchors { bottom : parent.bottom - bottomMargin : Variables.defaultMargin * 2 + bottomMargin : notification.visible ? Variables.defaultMargin * 5 : Variables.defaultMargin * 2 horizontalCenter: parent.horizontalCenter } text.text : qsTr("Save") @@ -120,11 +120,24 @@ enabled : _potassiumVolumeControl.active && _calciumVolumeControl.active onClicked : { + if ( vTreatmentCreate.acidConcentrateRejectReason ) { vTreatmentCreate.acidConcentrateRejectReason = Variables.noRejectReason } vTreatmentRanges.doSaveAcidConcentrate(_root.adjustment) - _potassiumVolumeControl.clear() - _calciumVolumeControl.clear() - _root.accept() } + + Behavior on anchors.bottomMargin { NumberAnimation { duration: 300} } } + + Connections { target: vTreatmentRanges + function onAcidConcentrateAcceptedChanged ( vAccepted ) { + if ( vAccepted ) { + _potassiumVolumeControl.clear() + _calciumVolumeControl.clear() + _root.accept() + } + else { + notificationText = qsTr("Duplicate Acid Concentrate Entry") + } + } + } } }