Index: sources/view/hd/data/VTreatmentRanges.cpp =================================================================== diff -u -r9de37dc1a1e423fe5798c76313d1574a8b638047 -r7d2122a9a4330ebc2ff4c22be36f32e9a82417ec --- sources/view/hd/data/VTreatmentRanges.cpp (.../VTreatmentRanges.cpp) (revision 9de37dc1a1e423fe5798c76313d1574a8b638047) +++ sources/view/hd/data/VTreatmentRanges.cpp (.../VTreatmentRanges.cpp) (revision 7d2122a9a4330ebc2ff4c22be36f32e9a82417ec) @@ -54,16 +54,16 @@ */ void View::VTreatmentRanges::doSaveAcidConcentrate (const QString &vOption) { - const QString mCategory = Storage::Settings_Category_DataList; + // check if unique + if ( _acidConcentrateOptions.contains(vOption) ) { return; } - _Settings.add(mCategory, - "Acid Concentrate Options", - vOption, - QVariant("temp"), // set temp string to know to remove later - false ); + if ( ! _acidConcentrate.isEmpty() ) { _acidConcentrateOptions.removeLast(); } + _acidConcentrateOptions.append(vOption); + acidConcentrate(vOption); + // update - acidConcentrateOptions ( _Settings.keys(mCategory, "Acid Concentrate Options" )); + emit acidConcentrateOptionsChanged(_acidConcentrateOptions); } /** @@ -75,21 +75,11 @@ { if ( ! vSet ) { return; } - const QString mCategory = Storage::Settings_Category_DataList; - const int size = _Settings.keys(mCategory, "Acid Concentrate Options" ).size(); + if ( ! _acidConcentrate.isEmpty() ) { _acidConcentrateOptions.removeLast(); } + acidConcentrate(""); - for ( int i = size - 1; i >= 0; --i ) { - // remove any populated values. The original from .config are empty strings - if ( ! _Settings.values(mCategory, "Acid Concentrate Options" )[i].toString().isEmpty() ) { - _Settings.remove(mCategory, - "Acid Concentrate Options", - _Settings.keys(mCategory, "Acid Concentrate Options")[i], - _Settings.values(mCategory, "Acid Concentrate Options" )[i]); - } - } - // update - acidConcentrateOptions ( _Settings.keys(mCategory, "Acid Concentrate Options" )); + emit acidConcentrateOptionsChanged(_acidConcentrateOptions); } /*! @@ -133,9 +123,10 @@ FROMVARIANT_WITHRETURN ( heparinBolusVolumeRes , "Heparin Bolus Volume Ranges" , "Heparin_Bolus_Volume_Res" , Float , isConfigsOk ); FROMVARIANT_WITHRETURN ( heparinStopTimeMin , "Heparin Stop Time Ranges" , "Heparin_Stop_Time_Min" , UInt , isConfigsOk ); - FROMVARIANT_WITHRETURN ( heparinStopTimeMax , "Heparin Stop Time Ranges" , "Heparin_Stop_Time_Max" , UInt , isConfigsOk ); - FROMVARIANT_WITHRETURN ( heparinStopTimeRes , "Heparin Stop Time Ranges" , "Heparin_Stop_Time_Res" , UInt , isConfigsOk ); - FROMVARIANT_WITHRETURN ( heparinStopTimeDef , "Heparin Stop Time Ranges" , "Heparin_Stop_Time_Def" , UInt , isConfigsOk ); +// These were removed to ensure the check on the Heparin stop time matches the Treatment Duration. +// FROMVARIANT_WITHRETURN ( heparinStopTimeMax , "Heparin Stop Time Ranges" , "Heparin_Stop_Time_Max" , UInt , isConfigsOk ); +// FROMVARIANT_WITHRETURN ( heparinStopTimeRes , "Heparin Stop Time Ranges" , "Heparin_Stop_Time_Res" , UInt , isConfigsOk ); +// FROMVARIANT_WITHRETURN ( heparinStopTimeDef , "Heparin Stop Time Ranges" , "Heparin_Stop_Time_Def" , UInt , isConfigsOk ); FROMVARIANT_WITHRETURN ( salineBolusVolumeDef , "Saline Bolus Volume Ranges" , "Saline_Bolus_Volume_Def" , UInt , isConfigsOk ); FROMVARIANT_WITHRETURN ( salineBolusVolumeMin , "Saline Bolus Volume Ranges" , "Saline_Bolus_Volume_Min" , UInt , isConfigsOk );