From ecb1524f8da7901338b263384fed3c612f117b4c Mon Sep 17 00:00:00 2001 From: Daniel Wilhelm Date: Fri, 18 Apr 2014 17:22:36 +0200 Subject: 5.11 --- wx+/context_menu.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'wx+/context_menu.h') diff --git a/wx+/context_menu.h b/wx+/context_menu.h index cb6cb86d..2557737a 100644 --- a/wx+/context_menu.h +++ b/wx+/context_menu.h @@ -30,9 +30,9 @@ class ContextMenu : private wxEvtHandler public: ContextMenu() : menu(new wxMenu) {} - void addItem(const wxString& label, const std::function& command, const wxBitmap* bmp = nullptr, bool enabled = true, int id = wxID_ANY) + void addItem(const wxString& label, const std::function& command, const wxBitmap* bmp = nullptr, bool enabled = true) { - wxMenuItem* newItem = new wxMenuItem(menu.get(), id, label); //menu owns item! + wxMenuItem* newItem = new wxMenuItem(menu.get(), wxID_ANY, label); //menu owns item! if (bmp) newItem->SetBitmap(*bmp); //do not set AFTER appending item! wxWidgets screws up for yet another crappy reason menu->Append(newItem); if (!enabled) newItem->Enable(false); //do not enable BEFORE appending item! wxWidgets screws up for yet another crappy reason -- cgit