X-Git-Url: http://Server1/repobrowser/?a=blobdiff_plain;f=source%2Fcontacteditor%2FfrmContactEditorAddress.cpp;h=155661817680933e3b2a19703569563e20599d36;hb=b813f99bbcbdf103f82ece0935419a784f0f51e9;hp=b20adeb3c7a83865eba327f01d6d6629ea83b0c4;hpb=183fe3ef7931cfae2b38cec8f1ed87980bdc1185;p=xestiaab%2F.git diff --git a/source/contacteditor/frmContactEditorAddress.cpp b/source/contacteditor/frmContactEditorAddress.cpp index b20adeb..1556618 100644 --- a/source/contacteditor/frmContactEditorAddress.cpp +++ b/source/contacteditor/frmContactEditorAddress.cpp @@ -388,7 +388,8 @@ void frmContactEditorAddress::SetEditorMode( bool EditMode, SectionType SectType striter = AddressListPtr->find(AddressListIndex); - if (striter->first == AddressListIndex){ + if (striter->first == AddressListIndex && + striter != AddressListPtr->end()){ txtAddress->SetValue(striter->second); @@ -396,7 +397,8 @@ void frmContactEditorAddress::SetEditorMode( bool EditMode, SectionType SectType striter = AddressListTownPtr->find(AddressListIndex); - if (striter->first == AddressListIndex){ + if (striter->first == AddressListIndex && + striter != AddressListTownPtr->end()){ txtTownCity->SetValue(striter->second); @@ -404,7 +406,8 @@ void frmContactEditorAddress::SetEditorMode( bool EditMode, SectionType SectType striter = AddressListCountyPtr->find(AddressListIndex); - if (striter->first == AddressListIndex){ + if (striter->first == AddressListIndex && + striter != AddressListCountyPtr->end()){ txtCounty->SetValue(striter->second); @@ -412,7 +415,8 @@ void frmContactEditorAddress::SetEditorMode( bool EditMode, SectionType SectType striter = AddressListPostCodePtr->find(AddressListIndex); - if (striter->first == AddressListIndex){ + if (striter->first == AddressListIndex && + striter != AddressListPostCodePtr->end()){ txtPostCode->SetValue(striter->second); @@ -420,7 +424,8 @@ void frmContactEditorAddress::SetEditorMode( bool EditMode, SectionType SectType striter = AddressListCountryPtr->find(AddressListIndex); - if (striter->first == AddressListIndex){ + if (striter->first == AddressListIndex && + striter != AddressListCountryPtr->end()){ txtCountry->SetValue(striter->second); @@ -433,7 +438,8 @@ void frmContactEditorAddress::SetEditorMode( bool EditMode, SectionType SectType intiter = AddressListPrefPtr->find(AddressListIndex); - if (intiter->first == AddressListIndex && intiter->second > 0 && intiter != AddressListPrefPtr->end()){ + if (intiter->first == AddressListIndex && intiter->second > 0 && intiter != AddressListPrefPtr->end() && + intiter != AddressListPrefPtr->end()){ sliPriority->SetValue(intiter->second); sliPriority->Enable(); @@ -445,9 +451,14 @@ void frmContactEditorAddress::SetEditorMode( bool EditMode, SectionType SectType striter = AddressListLabelPtr->find(AddressListIndex); - if (striter->first == AddressListIndex){ + if (striter->first == AddressListIndex && striter != AddressListLabelPtr->end() && + striter != AddressListLabelPtr->end()){ strValue = striter->second; + if (strValue.Left(1) == "\"" && strValue.Right(1) == "\""){ + strValue.erase(0, 1); + strValue.RemoveLast(); + } } @@ -457,17 +468,17 @@ void frmContactEditorAddress::SetEditorMode( bool EditMode, SectionType SectType striter = AddressListLangPtr->find(AddressListIndex); - if (striter->first == AddressListIndex){ + if (striter->first == AddressListIndex && striter != AddressListLangPtr->end()){ strValue = striter->second; - + } cmbLanguage->SetValue(strValue); striter = AddressListGeoPtr->find(AddressListIndex); - if (striter->first == AddressListIndex){ + if (striter->first == AddressListIndex && striter != AddressListGeoPtr->end()){ strValue = striter->second; @@ -477,7 +488,7 @@ void frmContactEditorAddress::SetEditorMode( bool EditMode, SectionType SectType striter = AddressListTimezonePtr->find(AddressListIndex); - if (striter->first == AddressListIndex){ + if (striter->first == AddressListIndex && striter != AddressListTimezonePtr->end()){ strValue = striter->second;