Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
frmContactEditor: Fix issue with intValueSeek not being incremented properly
[xestiaab/.git] / source / contacteditor / frmContactEditor-Category.cpp
index 3150377..f3e919f 100644 (file)
@@ -37,7 +37,8 @@ void frmContactEditor::AddCategory( wxCommandEvent& event )
        frameCECategory->ShowModal();
        delete frameCECategory;
        frameCECategory = NULL;
-       
+    intValueSeek++;
+
 }
 
 void frmContactEditor::ModifyCategory( wxCommandEvent& event )
@@ -48,7 +49,7 @@ void frmContactEditor::ModifyCategory( wxCommandEvent& event )
        long longSelected = -1;
        int intSelectedData = 0;
     
-       if (!GetSelectedItem(lboCategories,
+       if (lboCategories->GetItemCount() == 0 || !GetSelectedItem(lboCategories,
                &longSelected,
                &intSelectedData)){
                
@@ -80,7 +81,7 @@ void frmContactEditor::DeleteCategory( wxCommandEvent& event )
        long longSelected = -1;
        int intSelectedData = 0;
     
-       if (!GetSelectedItem(lboCategories,
+       if (lboCategories->GetItemCount() == 0 || !GetSelectedItem(lboCategories,
                &longSelected,
                &intSelectedData)){
                
Xestia Software Development
Yn Maystri
© 2006 - 2019 Xestia Software Development
Software

Xestia Address Book
Xestia Calendar
Development

Xestia Gelforn
Everything else

About
News
Privacy Policy