X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1e6feb95a79834836e88143b15d9f424ebe79621..300b5dfabc6f7f0d9fc3f7865374b43e79c8f465:/src/msw/menu.cpp diff --git a/src/msw/menu.cpp b/src/msw/menu.cpp index e15df2c855..e4299163f2 100644 --- a/src/msw/menu.cpp +++ b/src/msw/menu.cpp @@ -172,7 +172,7 @@ void wxMenu::UpdateAccel(wxMenuItem *item) if ( accel ) m_accels[n] = accel; else - m_accels.Remove(n); + m_accels.RemoveAt(n); } if ( IsAttached() ) @@ -317,7 +317,7 @@ wxMenuItem *wxMenu::DoRemove(wxMenuItem *item) { delete m_accels[n]; - m_accels.Remove(n); + m_accels.RemoveAt(n); } //else: this item doesn't have an accel, nothing to do #endif // wxUSE_ACCEL @@ -649,8 +649,6 @@ bool wxMenuBar::Insert(size_t pos, wxMenu *menu, const wxString& title) m_titles.Insert(title, pos); - menu->Attach(this); - if ( IsAttached() ) { if ( !::InsertMenu(GetHmenu(), pos, @@ -682,7 +680,8 @@ bool wxMenuBar::Append(wxMenu *menu, const wxString& title) if ( !wxMenuBarBase::Append(menu, title) ) return FALSE; - menu->Attach(this); + // Already done in Append above + //menu->Attach(this); m_titles.Add(title); @@ -721,8 +720,6 @@ wxMenu *wxMenuBar::Remove(size_t pos) wxLogLastError(wxT("RemoveMenu")); } - menu->Detach(); - #if wxUSE_ACCEL if ( menu->HasAccels() ) { @@ -773,8 +770,6 @@ void wxMenuBar::Attach(wxFrame *frame) { wxMenuBarBase::Attach(frame); - m_menuBarFrame = frame; - #if wxUSE_ACCEL RebuildAccelTable(); #endif // wxUSE_ACCEL