}
else
{
+ // MacOS counts menu items from 1 and inserts after, therefore having the
+ // same effect as wx 0 based and inserting before, we must correct pos
+ // after however for updates to be correct
UMAInsertMenuItem(MAC_WXHMENU(m_hMenu), wxT("a") , pos);
+ pos += 1 ;
}
- SetMenuItemCommandID( MAC_WXHMENU(m_hMenu) , pos+1 , pItem->GetId() ) ;
+ SetMenuItemCommandID( MAC_WXHMENU(m_hMenu) , pos , pItem->GetId() ) ;
pItem->UpdateItemText() ;
pItem->UpdateItemBitmap() ;
pItem->UpdateItemStatus() ;
*/
wxMenuBar* wxMenuBar::s_macInstalledMenuBar = NULL ;
+wxMenuBar* wxMenuBar::s_macCommonMenuBar = NULL ;
void wxMenuBar::Init()
{
wxMenuBar::~wxMenuBar()
{
+ if (s_macCommonMenuBar == this)
+ s_macCommonMenuBar = NULL;
if (s_macInstalledMenuBar == this)
{
::ClearMenuBar();
Refresh();
}
- m_titles.Remove(pos);
+ m_titles.RemoveAt(pos);
return menu;
}