Diff of /src/hugin1/ptbatcher/ProjectListBox.cpp [9e26cc] .. [832b36]  Maximize  Restore

Switch to side-by-side view

--- a/src/hugin1/ptbatcher/ProjectListBox.cpp
+++ b/src/hugin1/ptbatcher/ProjectListBox.cpp
@@ -131,6 +131,7 @@
 void ProjectListBox::Deselect(int index)
 {
 	SetItemState(index, 0, wxLIST_STATE_SELECTED|wxLIST_STATE_FOCUSED);
+    m_selected=-1;
 }
 
 void ProjectListBox::Fill(Batch* batch)
@@ -209,7 +210,11 @@
 
 void ProjectListBox::Select(int index)
 {
-	SetItemState(index,wxLIST_STATE_SELECTED,wxLIST_STATE_SELECTED);
+    if(index>=0 && index<this->GetItemCount())
+    {
+        SetItemState(index,wxLIST_STATE_SELECTED,wxLIST_STATE_SELECTED);
+        m_selected=index;
+    };
 }
 
 void ProjectListBox::SetMissing(int index)

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks