]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/treectlg.cpp
Fix building wxSTC as a DLL using MinGW GCC 3.x.
[wxWidgets.git] / src / generic / treectlg.cpp
index 86ec19c302c2800670db4ec7400c6c2d8259318d..6354c38bfe827335b3f922aed0c523df17dbafce 100644 (file)
@@ -17,7 +17,7 @@
 // headers
 // -----------------------------------------------------------------------------
 
 // headers
 // -----------------------------------------------------------------------------
 
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
   #pragma implementation "treectlg.h"
 #endif
 
   #pragma implementation "treectlg.h"
 #endif
 
@@ -1091,7 +1091,7 @@ wxTreeItemId wxGenericTreeCtrl::GetNextChild(const wxTreeItemId& item,
     size_t *pIndex = (size_t *)&cookie;
     if ( *pIndex < children.Count() )
     {
     size_t *pIndex = (size_t *)&cookie;
     if ( *pIndex < children.Count() )
     {
-        return children.Item(*pIndex++);
+        return children.Item((*pIndex)++);
     }
     else
     {
     }
     else
     {
@@ -2317,8 +2317,8 @@ void wxGenericTreeCtrl::PaintLevel( wxGenericTreeItem *item, wxDC &dc, int level
             }
             else // no custom buttons
             {
             }
             else // no custom buttons
             {
-                static const int wImage = 10;
-                static const int hImage = 12;
+                static const int wImage = 9;
+                static const int hImage = 9;
 
                 wxRendererNative::Get().DrawTreeItemButton
                                         (
 
                 wxRendererNative::Get().DrawTreeItemButton
                                         (
@@ -2640,7 +2640,7 @@ void wxGenericTreeCtrl::OnChar( wxKeyEvent &event )
                     if (!next)
                     {
                         wxTreeItemId current = m_key_current;
                     if (!next)
                     {
                         wxTreeItemId current = m_key_current;
-                        while (current && !next)
+                        while (current.IsOk() && !next)
                         {
                             current = GetItemParent( current );
                             if (current) next = GetNextSibling( current );
                         {
                             current = GetItemParent( current );
                             if (current) next = GetNextSibling( current );