Index: sources/gui/qml/pages/treatment/TreatmentStack.qml =================================================================== diff -u -rc875558052c57819f270f3af970e12016d325fce -r9c86f0af32fb7a2530ab738b03d9a37359b9db8c --- sources/gui/qml/pages/treatment/TreatmentStack.qml (.../TreatmentStack.qml) (revision c875558052c57819f270f3af970e12016d325fce) +++ sources/gui/qml/pages/treatment/TreatmentStack.qml (.../TreatmentStack.qml) (revision 9c86f0af32fb7a2530ab738b03d9a37359b9db8c) @@ -74,6 +74,10 @@ readonly property bool isSBInProgress : ( vHDTreatmentStates.sbRunning || vHDTreatmentStates.sbWaitPump ) + readonly property bool isDialogOpened : _treatmentAdjustmentFlow.visible + || _treatmentAdjustmentPressuresLimits.visible + || _treatmentAdjustmentDuration.visible + || _treatmentUltrafiltrationItem.visible // Components MainMenu { id: _treatmentMenu y : Variables.mainMenuHeight * -1 @@ -96,7 +100,11 @@ } TreatmentBloodPrime { id: _treatmentBloodPrime } - TreatmentUltrafiltrationItem{ id: _treatmentUltrafiltrationItem } + TreatmentUltrafiltrationItem{ id: _treatmentUltrafiltrationItem + // - set visible to false as init state to correctly indicate visible screens + // - TreatmentUltrafiltrationItem is not a ScreenItem, thus visible is true automatically + visible:false + } TreatmentHome { id: _treatmentHome } Connections { target: _treatmentHome @@ -105,7 +113,6 @@ } function onSectionVitalsClicked ( vValue ) { _vitalEntry.open() - _bphrEntry.setFocus() } function onSectionPressuresClicked ( vValue ) { _treatmentAdjustmentPressuresLimits.open() @@ -187,7 +194,7 @@ onOpened : { vTreatmentVitals.doTimerStop() // Can't be moved to C++, and has to be handled here because it can manually being opened by the user - _keyboard.setVisible(true) + _bphrEntry.setFocus(!_root.isDialogOpened) } onClosed : { @@ -202,10 +209,8 @@ Connections { target: vTreatmentVitals function onDidTrigger ( vSystolic, vDiastolic, vHeartRate ) { if ( vTreatmentVitals.enableDialog ) { - if(_root.visible) { - _vitalEntry.update ( vSystolic, vDiastolic, vHeartRate ) - _vitalEntry.open () - } + _vitalEntry.update ( vSystolic, vDiastolic, vHeartRate ) + _vitalEntry.open () } } }