Index: sources/gui/qml/dialogs/headerbar/HeaderbarPrescription.qml =================================================================== diff -u -rf15173158b76aa650913d40a92881016e0625963 -r0975a67dd4e4673b9a7b226bfea02cbfa489c418 --- sources/gui/qml/dialogs/headerbar/HeaderbarPrescription.qml (.../HeaderbarPrescription.qml) (revision f15173158b76aa650913d40a92881016e0625963) +++ sources/gui/qml/dialogs/headerbar/HeaderbarPrescription.qml (.../HeaderbarPrescription.qml) (revision 0975a67dd4e4673b9a7b226bfea02cbfa489c418) @@ -22,15 +22,26 @@ 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 + left : parent.left + leftMargin : Variables.defaultMargin * 5 + } + text : qsTr("[Original Prescribed Parameters]") + visible : vTDOpMode.inTreatment + color : Colors.mainTreatmentOrange + font.pixelSize : 24 + } + + Text { id: descriptiveText + anchors { top : parent.top topMargin : -10 horizontalCenter : parent.horizontalCenter @@ -44,7 +55,7 @@ PreTreatmentCreateContent { id: _headerbarPrescriptionContent anchors { top : parent.top - topMargin : Variables.defaultMargin * -1 + topMargin : Variables.defaultMargin left : parent.left leftMargin : Variables.defaultMargin * 3 right : parent.right @@ -71,16 +82,19 @@ bottomMargin : 5 rightMargin : Variables.defaultMargin * 3 } - enabled : _headerbarPrescriptionContent.confirmReady() - text.text : vTreatmentCreate.parametersValidated ? qsTr("CONFIRM") : qsTr("VALIDATE") - visible : ! vTDOpMode.inTreatment && ! isConfirmed + enabled : _root.isFirstTab ? true : _headerbarPrescriptionContent.confirmReady() + text.text : _root.isFirstTab ? qsTr("Next") : qsTr("Validate") + visible : ! vTDOpMode.inTreatment && ! vTreatmentCreate.parametersValidated onClicked : { - if ( vTreatmentCreate.parametersValidated ) { - _headerbarPrescriptionContent.confirm() - _root.close() + if ( _root.isFirstTab ) { + _headerbarPrescriptionContent.currentIndex = PreTreatmentCreateContent.TreatmentSettings + return } - else { _headerbarPrescriptionContent.validate() } + + if ( ! vTreatmentCreate.parametersValidated ) { + _headerbarPrescriptionContent.validate() + } } } }