]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/treectrl.cpp
minor changes (fixing crash on mouse click)
[wxWidgets.git] / src / generic / treectrl.cpp
index 79a7c6e1cc7a7126abcf14ce1d3ec2e644ff2a18..b3bdc84ab72391745bfdfc2b39fd3693ed400273 100644 (file)
@@ -926,7 +926,7 @@ bool wxTreeCtrl::TagNextChildren(wxGenericTreeItem *crt_item, wxGenericTreeItem
 
     size_t count = children.Count();
     for (size_t n=(size_t)(index+1); n<count; ++n)
-      if (TagAllChildrenUntilLast(children[n], last_item, select)) return true;
+      if (TagAllChildrenUntilLast(children[n], last_item, select)) return TRUE;
 
     return TagNextChildren(parent, last_item, select);
 }
@@ -936,17 +936,17 @@ bool wxTreeCtrl::TagAllChildrenUntilLast(wxGenericTreeItem *crt_item, wxGenericT
   crt_item->SetHilight(select);
   RefreshLine(crt_item);
   
-  if (crt_item==last_item) return true;
+  if (crt_item==last_item) return TRUE;
 
   if (crt_item->HasChildren())
     {
       wxArrayTreeItems& children = crt_item->GetChildren();
       size_t count = children.Count();
       for ( size_t n = 0; n < count; ++n )
-       if (TagAllChildrenUntilLast(children[n], last_item, select)) return true;
+       if (TagAllChildrenUntilLast(children[n], last_item, select)) return TRUE;
     }
        
-  return false;
+  return FALSE;
 }
 
 void wxTreeCtrl::SelectItemRange(wxGenericTreeItem *item1, wxGenericTreeItem *item2)
@@ -970,7 +970,9 @@ void wxTreeCtrl::SelectItemRange(wxGenericTreeItem *item1, wxGenericTreeItem *it
   
   if (TagAllChildrenUntilLast(first,last,select)) return;
 
+/*
   cout << first->GetText() << " " << last->GetText() << " " << (int) select << endl;
+*/
   TagNextChildren(first,last,select);  
 }
 
@@ -986,8 +988,8 @@ void wxTreeCtrl::SelectItem(const wxTreeItemId& itemId,
     // to keep going anyhow !!!
     if (is_single) 
     {
-        unselect_others=true;
-        extended_select=false;
+        unselect_others=TRUE;
+        extended_select=FALSE;
     }
 
     wxGenericTreeItem *item = itemId.m_pItem;
@@ -998,14 +1000,18 @@ void wxTreeCtrl::SelectItem(const wxTreeItemId& itemId,
     event.SetEventObject( this );
     // Here we don't send any selection mode yet ! TO SEE 
     
+/*
     if (m_current)
       cout << m_current->GetText() << " " << (int)m_current->HasHilight() << endl;
+*/
 
     if ( GetEventHandler()->ProcessEvent( event ) && event.WasVetoed() )
       return;
 
+/*
     if (m_current)
-    cout << m_current->GetText() << " " << (int)m_current->HasHilight() << endl;
+      cout << m_current->GetText() << " " << (int)m_current->HasHilight() << endl;
+*/
 
     // ctrl press
     if (unselect_others)
@@ -1023,7 +1029,7 @@ void wxTreeCtrl::SelectItem(const wxTreeItemId& itemId,
     }
     else
     {
-        bool select=true; // the default
+        bool select=TRUE; // the default
 
        // Check if we need to toggle hilight (ctrl mode)
        if (!unselect_others)