From 41628a43cbb5e0b2d3e06c7d4aff0dc485503a2a Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 5 Feb 2011 16:38:53 +0000 Subject: [PATCH] Don't adjust menu item positions for title for menubar menus in wxMSW. The code in wxMSW menu code which accounted for the extra items used to show popup menu title has become incorrect since the changes of r66178 as now the non-popup menus have titles as well. Correct the check to only do the adjustment for the popup menus. Closes #12922. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66845 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/menu.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/msw/menu.cpp b/src/msw/menu.cpp index e4e5317d3d..afb0df14e9 100644 --- a/src/msw/menu.cpp +++ b/src/msw/menu.cpp @@ -397,8 +397,8 @@ bool wxMenu::DoInsertOrAppend(wxMenuItem *pItem, size_t pos) pos = GetMenuItemCount() - 1; } - // adjust position to account for the title, if any - if ( !m_title.empty() ) + // adjust position to account for the title of a popup menu, if any + if ( !GetMenuBar() && !m_title.empty() ) pos += 2; // for the title itself and its separator BOOL ok = false; -- 2.49.0