X-Git-Url: http://Server1/repobrowser/?a=blobdiff_plain;f=source%2Fcontacteditor%2FfrmContactEditor-Picture.cpp;h=e2eeae7089591f9095f11a8d5ebbf1a2fb732ea0;hb=f69e09d827e06435ea94bb73aa71ab5f9d5c035b;hp=cc299444b034de938008b155bd73e45afb91e697;hpb=635993e1cbdacc762a87271fc19d5f8411326886;p=xestiaab%2F.git diff --git a/source/contacteditor/frmContactEditor-Picture.cpp b/source/contacteditor/frmContactEditor-Picture.cpp index cc29944..e2eeae7 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, @@ -46,7 +43,8 @@ void frmContactEditor::AddPicture( wxCommandEvent& event ) frameCEPicture->ShowModal(); delete frameCEPicture; frameCEPicture = NULL; - + intValueSeek++; + } void frmContactEditor::ModifyPicture( wxCommandEvent& event ) @@ -57,7 +55,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 +89,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 +118,7 @@ void frmContactEditor::LoadPicture( wxListEvent& event ) long longSelected = -1; int intSelectedData = 0; - if (!GetSelectedItem(lboPictures, + if (lboPictures->GetItemCount() == 0 || !GetSelectedItem(lboPictures, &longSelected, &intSelectedData)){ return; @@ -182,7 +180,7 @@ void frmContactEditor::SavePicture( wxCommandEvent &event ) long longSelected = -1; int intSelectedData = 0; - if (!GetSelectedItem(lboPictures, + if (lboPictures->GetItemCount() == 0 || !GetSelectedItem(lboPictures, &longSelected, &intSelectedData)){