Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
frmContactEditor: Fix issue with intValueSeek not being incremented properly
[xestiaab/.git] / source / contacteditor / frmContactEditor-Logo.cpp
index 7aa3309..e4f7c96 100644 (file)
@@ -28,7 +28,7 @@ void frmContactEditor::LoadLogo( wxListEvent& event )
        long longSelected = -1;
        int intSelectedData = 0;
     
-       if (!GetSelectedItem(lboLogos,
+       if (lboLogos->GetItemCount() == 0 || !GetSelectedItem(lboLogos,
                &longSelected,
                 &intSelectedData)){
                return;
@@ -104,7 +104,8 @@ void frmContactEditor::AddLogo( wxCommandEvent& event )
        frameCELogo->ShowModal();
        delete frameCELogo;
        frameCELogo = NULL;
-       
+    intValueSeek++;
+
 }
 
 void frmContactEditor::ModifyLogo( wxCommandEvent& event )
@@ -115,7 +116,7 @@ void frmContactEditor::ModifyLogo( wxCommandEvent& event )
        long longSelected = -1;
        int intSelectedData = 0;
     
-       if (!GetSelectedItem(lboLogos,
+       if (lboLogos->GetItemCount() == 0 || !GetSelectedItem(lboLogos,
                &longSelected,
                &intSelectedData)){
                return;
@@ -149,7 +150,7 @@ void frmContactEditor::DeleteLogo( wxCommandEvent& event )
        long longSelected = -1;
        int intSelectedData = 0;
     
-       if (!GetSelectedItem(lboLogos,
+       if (lboLogos->GetItemCount() == 0 || !GetSelectedItem(lboLogos,
                &longSelected,
                 &intSelectedData)){
                return;
@@ -178,7 +179,7 @@ void frmContactEditor::SaveLogo( wxCommandEvent &event )
        long longSelected = -1;
        int intSelectedData = 0;
     
-       if (!GetSelectedItem(lboLogos,
+       if (lboLogos->GetItemCount() == 0 || !GetSelectedItem(lboLogos,
                          &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