]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/menu.cpp
avoid deprecated functions and direct struct access
[wxWidgets.git] / src / msw / menu.cpp
index e4e5317d3d54a20959a33756d7dca0f9b22467d6..afb0df14e95fdb445dfa8e5e84e75fa6b161f69f 100644 (file)
@@ -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;