Index: sources/gui/qml/dialogs/headerbar/HeaderbarPrescription.qml =================================================================== diff -u -r29a44b6e5908da155195c138b5e522fa8ce90fb4 -r82b22f0f0ae1ff5b0a5c1524c7e91cc8d667b180 --- sources/gui/qml/dialogs/headerbar/HeaderbarPrescription.qml (.../HeaderbarPrescription.qml) (revision 29a44b6e5908da155195c138b5e522fa8ce90fb4) +++ sources/gui/qml/dialogs/headerbar/HeaderbarPrescription.qml (.../HeaderbarPrescription.qml) (revision 82b22f0f0ae1ff5b0a5c1524c7e91cc8d667b180) @@ -22,18 +22,15 @@ import "qrc:/pages/pretreatment/create" ModalDialog { id: _root - readonly property bool isConfirmed: vTreatmentCreate.parametersConfirmed readonly property bool isFirstTab : _headerbarPrescriptionContent.currentIndex === PreTreatmentCreateContent.PatientPrescription padding : Variables.defaultMargin - onOpened: _headerbarPrescriptionContent.canEdit( ! ( vTreatmentCreate.parametersValidated || vTreatmentCreate.parametersConfirmed ) ) + onOpened: _headerbarPrescriptionContent.canEdit( ! vTreatmentCreate.parametersValidated ) - onIsConfirmedChanged: if (isConfirmed) { _root.close() } Text { id: descriptiveText anchors { top : parent.top -// topMargin : -10 left : parent.left leftMargin : Variables.defaultMargin * 5 } @@ -77,19 +74,17 @@ text.text : _root.isFirstTab ? qsTr("Next") : vTreatmentCreate.parametersValidated ? qsTr("Confirm") : qsTr("Validate") - visible : ! vTDOpMode.inTreatment && ! isConfirmed + visible : ! vTDOpMode.inTreatment && ! vTreatmentCreate.parametersValidated onClicked : { if ( _root.isFirstTab ) { _headerbarPrescriptionContent.currentIndex = PreTreatmentCreateContent.TreatmentSettings return } - if ( vTreatmentCreate.parametersValidated ) { - _headerbarPrescriptionContent.confirm() - _root.close() + if ( ! vTreatmentCreate.parametersValidated ) { + _headerbarPrescriptionContent.validate() } - else { _headerbarPrescriptionContent.validate() } } } }