diff --git a/include/wx/generic/treectrl.h b/include/wx/generic/treectrl.h index 2550b4a5cd..b862bbfb52 100644 --- a/include/wx/generic/treectrl.h +++ b/include/wx/generic/treectrl.h @@ -37,7 +37,7 @@ static const int wxTREE_HITTEST_ONITEMLABEL = 0x0080; // anywhere on the item static const int wxTREE_HITTEST_ONITEM = wxTREE_HITTEST_ONITEMICON | wxTREE_HITTEST_ONITEMLABEL; - + // ----------------------------------------------------------------------------- // forward declaration // ----------------------------------------------------------------------------- diff --git a/src/generic/treectrl.cpp b/src/generic/treectrl.cpp index 5d1909a46e..203cd8ab32 100644 --- a/src/generic/treectrl.cpp +++ b/src/generic/treectrl.cpp @@ -580,7 +580,7 @@ wxTreeItemId wxTreeCtrl::GetNextSibling(const wxTreeItemId& item) const wxASSERT( index != NOT_FOUND ); // I'm not a child of my parent? size_t n = (size_t)(index + 1); - return n == siblings.Count() ? wxTreeItemId() : (wxTreeItemId) siblings[n]; + return n == siblings.Count() ? wxTreeItemId() : wxTreeItemId(siblings[n]); } wxTreeItemId wxTreeCtrl::GetPrevSibling(const wxTreeItemId& item) const @@ -599,7 +599,8 @@ wxTreeItemId wxTreeCtrl::GetPrevSibling(const wxTreeItemId& item) const int index = siblings.Index(i); wxASSERT( index != NOT_FOUND ); // I'm not a child of my parent? - return index == 0 ? wxTreeItemId() : (wxTreeItemId) siblings[(size_t)(index - 1)]; + return index == 0 ? wxTreeItemId() + : wxTreeItemId(siblings[(size_t)(index - 1)]); } wxTreeItemId wxTreeCtrl::GetFirstVisibleItem() const @@ -1198,7 +1199,6 @@ void wxTreeCtrl::OnPaint( wxPaintEvent &WXUNUSED(event) ) wxPaintDC dc(this); PrepareDC( dc ); -// dc.SetFont( wxSystemSettings::GetSystemFont( wxSYS_SYSTEM_FONT ) ); dc.SetFont( wxSystemSettings::GetSystemFont( wxSYS_DEFAULT_GUI_FONT ) ); dc.SetPen( m_dottedPen ); @@ -1448,8 +1448,7 @@ void wxTreeCtrl::CalculatePositions() wxClientDC dc(this); PrepareDC( dc ); -// dc.SetFont( wxSystemSettings::GetSystemFont( wxSYS_SYSTEM_FONT ) ); - dc.SetFont( wxSystemSettings::GetSystemFont( wxSYS_DEFAULT_GUI_FONT ) ); + dc.SetFont( wxSystemSettings::GetSystemFont( wxSYS_DEFAULT_GUI_FONT ) ); dc.SetPen( m_dottedPen ); m_lineHeight = (int)(dc.GetCharHeight() + 4);