use kind, not id, of a menu item to test whether it's a separator: this allows having separators with ids other than wxID_SEPARATOR in case it's useful to distinguish between them (patch 1929039)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53056 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -56,7 +56,6 @@ public:
|
||||
// get/set id
|
||||
void SetId(int itemid) { m_id = itemid; }
|
||||
int GetId() const { return m_id; }
|
||||
bool IsSeparator() const { return m_id == wxID_SEPARATOR; }
|
||||
|
||||
// the item's text (or name)
|
||||
//
|
||||
@@ -81,6 +80,7 @@ public:
|
||||
// what kind of menu item we are
|
||||
wxItemKind GetKind() const { return m_kind; }
|
||||
void SetKind(wxItemKind kind) { m_kind = kind; }
|
||||
bool IsSeparator() const { return m_kind == wxITEM_SEPARATOR; }
|
||||
|
||||
virtual void SetCheckable(bool checkable) { m_kind = checkable ? wxITEM_CHECK : wxITEM_NORMAL; }
|
||||
bool IsCheckable() const
|
||||
|
Reference in New Issue
Block a user