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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user