Index: sources/view/hd/adjustment/VTreatmentAdjustmentSaline.cpp =================================================================== diff -u -r6cad9b004e904200b71de7431c745795256080df -r2c9421bd6da03c7e0bd0bfa1f49fa95c2bd18a95 --- sources/view/hd/adjustment/VTreatmentAdjustmentSaline.cpp (.../VTreatmentAdjustmentSaline.cpp) (revision 6cad9b004e904200b71de7431c745795256080df) +++ sources/view/hd/adjustment/VTreatmentAdjustmentSaline.cpp (.../VTreatmentAdjustmentSaline.cpp) (revision 2c9421bd6da03c7e0bd0bfa1f49fa95c2bd18a95) @@ -20,7 +20,6 @@ VIEW_DEF_CLASS_ADJUSTMENT(VTreatmentAdjustmentSaline, AdjustSalineResponseData) void VTreatmentAdjustmentSaline::initConnections() { - ACTION_VIEW_CONNECTION(TreatmentStatesData ); ACTION_VIEW_CONNECTION(AdjustSalineResponseData); ADJUST_VIEW_CONNECTION(AdjustSalineRequestData ); } @@ -31,37 +30,20 @@ adjustment_Reason ( vData.mReason ); target ( vData.mTarget ); - if (adjustment_Accepted()) { - // the response doesn't have the state so the requested state which has been accepted is used. - isStarted ( _data.requestedState == AdjustSalineRequestData::eStart ); - } + state ( vData.mState ); // *** has to be the last to let the information to be set and then emit the signal *** // *** otherwise will use the previous values before being set. *** adjustment ( true ); } /*! - * \brief VTreatmentAdjustmentSaline::onActionReceive - * \details This is the message handler of when the Saline is done - * the state of the Saline in the SalineState of the TreatmentStates message will change at anytime - * and so the state of the UI should change in regards to that field and affect the isStarted - * after the saline start request has been accepted. - * \param vData - data of the Treatment State Message. - */ -void VTreatmentAdjustmentSaline::onActionReceive(const TreatmentStatesData &vData) -{ - isStarted ( vData.mSalineState == GuiSalineStates::SALINE_BOLUS_STATE_IN_PROGRESS ); - isDisabled( vData.mSalineState == GuiSalineStates::SALINE_BOLUS_STATE_MAX_DELIVERED ); -} - -/*! * \brief View::VTreatmentAdjustmentSaline::doAdjustment * \details the invocable slot to adjust(start/stop) the treatment saline bolus state */ void View::VTreatmentAdjustmentSaline::doAdjustment() { - if (isStarted()) { + if ( state() == AdjustSalineRequestData::eStart ) { // last received/response state _data.requestedState = AdjustSalineRequestData::eStop; } else {