also assert in generic GetSelection() if the control is in multiselection mode, for consistency with wxMSW and other controls

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49571 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2007-11-01 00:09:13 +00:00
parent f20f1e944c
commit d1f7240a09

View File

@@ -112,7 +112,13 @@ public:
// ----------
virtual wxTreeItemId GetRootItem() const { return m_anchor; }
virtual wxTreeItemId GetSelection() const { return m_current; }
virtual wxTreeItemId GetSelection() const
{
wxASSERT_MSG( !HasFlag(wxTR_MULTIPLE),
wxT("must use GetSelections() with this control") );
return m_current;
}
virtual size_t GetSelections(wxArrayTreeItemIds&) const;
virtual wxTreeItemId GetItemParent(const wxTreeItemId& item) const;