X-Git-Url: http://Server1/repobrowser/?a=blobdiff_plain;f=source%2Fcontacteditor%2FfrmContactEditor-Picture.cpp;h=fd9d169c5992e1f1b9c0731e55822eacd6dbf869;hb=074e2db3331d35762f1d2dcf06d98f15200fc225;hp=add6570ace4ff0ff05c588d1717d97328c790e64;hpb=b7da64cd1d2133700e97d3542ff364ebe1de3a89;p=xestiaab%2F.git diff --git a/source/contacteditor/frmContactEditor-Picture.cpp b/source/contacteditor/frmContactEditor-Picture.cpp index add6570..fd9d169 100644 --- a/source/contacteditor/frmContactEditor-Picture.cpp +++ b/source/contacteditor/frmContactEditor-Picture.cpp @@ -25,12 +25,9 @@ void frmContactEditor::AddPicture( wxCommandEvent& event ) { // Bring up window for adding a picture. - - int intResult = 0; - + frmContactEditorPicture *frameCEPicture = new frmContactEditorPicture ( this ); frameCEPicture->SetEditorMode(FALSE); - intResult = GetLastInt(&ContactEditorData.PicturesList); frameCEPicture->SetupPointers(&ContactEditorData.PicturesList, &ContactEditorData.PicturesListAltID, &ContactEditorData.PicturesListPID, @@ -57,7 +54,7 @@ void frmContactEditor::ModifyPicture( wxCommandEvent& event ) long longSelected = -1; int intSelectedData = 0; - if (!GetSelectedItem(lboPictures, + if (lboPictures->GetItemCount() == 0 || !GetSelectedItem(lboPictures, &longSelected, &intSelectedData)){ return; @@ -91,7 +88,7 @@ void frmContactEditor::DeletePicture( wxCommandEvent& event ) long longSelected = -1; int intSelectedData = 0; - if (!GetSelectedItem(lboPictures, + if (lboPictures->GetItemCount() == 0 || !GetSelectedItem(lboPictures, &longSelected, &intSelectedData)){ return; @@ -120,7 +117,7 @@ void frmContactEditor::LoadPicture( wxListEvent& event ) long longSelected = -1; int intSelectedData = 0; - if (!GetSelectedItem(lboPictures, + if (lboPictures->GetItemCount() == 0 || !GetSelectedItem(lboPictures, &longSelected, &intSelectedData)){ return; @@ -138,7 +135,6 @@ void frmContactEditor::LoadPicture( wxListEvent& event ) wxMemoryInputStream istream(base64dec.c_str(), (size_t)base64dec.size()); wxImage photo; - //wxMemoryInputStream istream(base64dec, (size_t)base64dec.size()); if (pictypeiter->second == wxT("image/jpeg")){ @@ -183,7 +179,7 @@ void frmContactEditor::SavePicture( wxCommandEvent &event ) long longSelected = -1; int intSelectedData = 0; - if (!GetSelectedItem(lboPictures, + if (lboPictures->GetItemCount() == 0 || !GetSelectedItem(lboPictures, &longSelected, &intSelectedData)){