void wxTreeCtrl::DoExpand(const wxTreeItemId& item, int flag)
{
- wxASSERT_MSG( flag == TVE_COLLAPSE || flag == TVE_COLLAPSERESET ||
- flag == TVE_EXPAND || flag == TVE_TOGGLE,
+ wxASSERT_MSG( flag == TVE_COLLAPSE ||
+ flag == (TVE_COLLAPSE | TVE_COLLAPSERESET) ||
+ flag == TVE_EXPAND ||
+ flag == TVE_TOGGLE,
"Unknown flag in wxTreeCtrl::DoExpand" );
// TreeView_Expand doesn't send TVN_ITEMEXPAND(ING) messages, so we must
void wxTreeCtrl::CollapseAndReset(const wxTreeItemId& item)
{
- DoExpand(item, TVE_COLLAPSERESET);
+ DoExpand(item, TVE_COLLAPSE | TVE_COLLAPSERESET);
}
void wxTreeCtrl::Toggle(const wxTreeItemId& item)
wxTreeItemData *pItem2,
wxTreeCtrl *tree)
{
+ wxCHECK_MSG( pItem1 && pItem2, 0,
+ _T("sorting tree without data doesn't make sense") );
+
return tree->OnCompareItems(pItem1->GetId(), pItem2->GetId());
}
}
// process WM_NOTIFY Windows message
-bool wxTreeCtrl::MSWNotify(WXWPARAM wParam, WXLPARAM lParam, WXLPARAM *result)
+bool wxTreeCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result)
{
wxTreeEvent event(wxEVT_NULL, m_windowId);
wxEventType eventType = wxEVT_NULL;
}
default:
- return wxControl::MSWNotify(wParam, lParam, result);
+ return wxControl::MSWOnNotify(idCtrl, lParam, result);
}
event.SetEventObject(this);