]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/treectlg.cpp
wxMSWUniv build fix.
[wxWidgets.git] / src / generic / treectlg.cpp
index 5f9fd71482aaa6cf8bd44d19380808588c8a4c93..bdd3003ec196ec3a1aca14526a72b1ea1886d30e 100644 (file)
@@ -475,7 +475,7 @@ void wxTreeTextCtrl::OnKillFocus( wxFocusEvent &event )
         // We must finish regardless of success, otherwise we'll get
         // focus problems:
         Finish();
-        
+
         if ( !AcceptChanges() )
             m_owner->OnRenameCancelled( m_itemEdited );
     }
@@ -1931,7 +1931,7 @@ void wxGenericTreeCtrl::SelectItem(const wxTreeItemId& itemId, bool select)
 {
     if ( select )
     {
-        DoSelectItem(itemId);
+        DoSelectItem(itemId, !HasFlag(wxTR_MULTIPLE));
     }
     else // deselect
     {
@@ -2279,12 +2279,14 @@ void wxGenericTreeCtrl::PaintItem(wxGenericTreeItem *item, wxDC& dc)
     {
         wxColour colBg;
         if ( attr && attr->HasBackgroundColour() )
-       {
-           drawItemBackground = true;
+        {
+            drawItemBackground = true;
             colBg = attr->GetBackgroundColour();
-       }
+        }
         else
+        {
             colBg = m_backgroundColour;
+        }
         dc.SetBrush(wxBrush(colBg, wxSOLID));
     }
 
@@ -3246,7 +3248,7 @@ void wxGenericTreeCtrl::OnMouse( wxMouseEvent &event )
         {
             // this facilitates multiple-item drag-and-drop
 
-            if (item && HasFlag(wxTR_MULTIPLE))
+            if ( /* item && */ HasFlag(wxTR_MULTIPLE))
             {
                 wxArrayTreeItemIds selections;
                 size_t count = GetSelections(selections);