X-Git-Url: http://Server1/repobrowser/?a=blobdiff_plain;f=source%2Fcontacteditor%2FfrmContactEditor-Category.cpp;h=3fc61ae50ab8f58108be08fe538931227ceeedfb;hb=ada42724cf083b0a311cf22260485d61516c25c8;hp=08af176e6fcf065c4f902179043f4b852fbe6989;hpb=4dab38868aa89e14497263a9ac0d6f737151cc09;p=xestiaab%2F.git diff --git a/source/contacteditor/frmContactEditor-Category.cpp b/source/contacteditor/frmContactEditor-Category.cpp index 08af176..3fc61ae 100644 --- a/source/contacteditor/frmContactEditor-Category.cpp +++ b/source/contacteditor/frmContactEditor-Category.cpp @@ -23,12 +23,9 @@ void frmContactEditor::AddCategory( wxCommandEvent& event ) { // Bring up the window to add a category. - - int intResult = 0; frmContactEditorCategory *frameCECategory = new frmContactEditorCategory ( this ); frameCECategory->SetEditorMode(FALSE); - intResult = GetLastInt(&ContactEditorData.CategoriesList); frameCECategory->SetupPointers(&ContactEditorData.CategoriesList, &ContactEditorData.CategoriesListAltID, &ContactEditorData.CategoriesListPID, @@ -51,7 +48,7 @@ void frmContactEditor::ModifyCategory( wxCommandEvent& event ) long longSelected = -1; int intSelectedData = 0; - if (!GetSelectedItem(lboCategories, + if (lboCategories->GetItemCount() == 0 || !GetSelectedItem(lboCategories, &longSelected, &intSelectedData)){ @@ -83,7 +80,7 @@ void frmContactEditor::DeleteCategory( wxCommandEvent& event ) long longSelected = -1; int intSelectedData = 0; - if (!GetSelectedItem(lboCategories, + if (lboCategories->GetItemCount() == 0 || !GetSelectedItem(lboCategories, &longSelected, &intSelectedData)){