X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b5dbe15d0bacde245539f54c4d97af6b4696f01f..3f434666bf9476e7fc6c27de94075211db5f1417:/include/wx/generic/treectlg.h diff --git a/include/wx/generic/treectlg.h b/include/wx/generic/treectlg.h index 67d13c69db..f57802cf70 100644 --- a/include/wx/generic/treectlg.h +++ b/include/wx/generic/treectlg.h @@ -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;