Index: sources/gui/qml/pages/treatment/TreatmentStack.qml =================================================================== diff -u -r7cc15ae5968205b241a08ca4646f283b8bf97b03 -r821bf955d0ba7e028bccfee7c04ca77cf80a0bd4 --- sources/gui/qml/pages/treatment/TreatmentStack.qml (.../TreatmentStack.qml) (revision 7cc15ae5968205b241a08ca4646f283b8bf97b03) +++ sources/gui/qml/pages/treatment/TreatmentStack.qml (.../TreatmentStack.qml) (revision 821bf955d0ba7e028bccfee7c04ca77cf80a0bd4) @@ -46,14 +46,14 @@ signal backClicked // Components - MainMenu { id: _treatmentMenu + MainMenu { id: _treatmentMenu y : Variables.mainMenuHeight * -1 position : MainMenu.Position.Top hidden : true titles : [ qsTr("Back") , qsTr("Treatment") , qsTr("Trending") , qsTr("Settings") ] spacing : 20 leftPdding : 20 - partitionWidth : 100 // Todo Important : max width should be the width for all + partitionWidth : 100 // Todo Important : max width should be the width for all bottons hasRightText : true hasLogo : true } @@ -151,16 +151,25 @@ } Connections { target: vHDOperationMode - onInTreatmentChanged : { if ( vinTreatment ) { push( _treatmentStart )}} + // The initail screen should be the Blood Prime, since that one is the earlier state in the list. + // also since it is being used in two stacks In-Treatment and also in End-Treatmet is has been defined in the MainStack. + onInTreatmentChanged : { page( _postTreatmentBloodPrime , vinTreatment )} } + Connections { target: _postTreatmentBloodPrime + onVisibleChanged: { + if (_postTreatmentBloodPrime.visible) { + _treatmentMenu.hidden = true + } + } + } + Connections { target: vHDTreatmentStates // in-Treatmet - onTxDialysisChanged : { if ( vtxDialysis ) { push( _treatmentStart )}} + onTxDialysisChanged : { page( _treatmentStart , vtxDialysis )} } Connections { target: _mainHome - onStartTreatment : push( _treatmentStart ) - onVisibleChanged : if (_mainHome.visible) _treatmentMenu.hidden = true + onStartTreatment : { page ( _treatmentStart )} } }