#if wxUSE_MDI
#include "wx/frame.h"
+#include "wx/menu.h"
// forward declarations
class WXDLLIMPEXP_FWD_CORE wxMDIParentFrame;
// menu can be NULL to disable the window menu completely
virtual void SetWindowMenu(wxMenu *menu)
{
- delete m_windowMenu;
- m_windowMenu = menu;
+ if ( menu != m_windowMenu )
+ {
+ delete m_windowMenu;
+ m_windowMenu = menu;
+ }
}
#endif // wxUSE_MENUS