X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9c7f49f569dcabe360a3a51a94eff77225b39d69..1978421a6d8b81c1f8a961da4b8ddf544fec7b1b:/src/generic/treectlg.cpp?ds=sidebyside diff --git a/src/generic/treectlg.cpp b/src/generic/treectlg.cpp index 86ec19c302..6354c38bfe 100644 --- a/src/generic/treectlg.cpp +++ b/src/generic/treectlg.cpp @@ -17,7 +17,7 @@ // headers // ----------------------------------------------------------------------------- -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #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() ) { - return children.Item(*pIndex++); + return children.Item((*pIndex)++); } else { @@ -2317,8 +2317,8 @@ void wxGenericTreeCtrl::PaintLevel( wxGenericTreeItem *item, wxDC &dc, int level } 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 ( @@ -2640,7 +2640,7 @@ void wxGenericTreeCtrl::OnChar( wxKeyEvent &event ) if (!next) { wxTreeItemId current = m_key_current; - while (current && !next) + while (current.IsOk() && !next) { current = GetItemParent( current ); if (current) next = GetNextSibling( current );