]> git.saurik.com Git - wxWidgets.git/commitdiff
Fix for missing separator if any previous items were ownerdrawn
authorJulian Smart <julian@anthemion.co.uk>
Tue, 9 Jan 2007 21:19:09 +0000 (21:19 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Tue, 9 Jan 2007 21:19:09 +0000 (21:19 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44181 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/menu.cpp

index 316f1a9ce9a81b13ef197790efc57434db864b82..78c4822c0eaf704c7b5cac82ff6fa881e97f2cc8 100644 (file)
@@ -400,14 +400,14 @@ bool wxMenu::DoInsertOrAppend(wxMenuItem *pItem, size_t pos)
         pos += 2; // for the title itself and its separator
 
     BOOL ok = false;
-    
+
 #if wxUSE_OWNER_DRAWN
     // Currently, mixing owner-drawn and non-owner-drawn items results in
     // inconsistent margins, so we force this to be owner-drawn if any other
     // items already are. Later we might want to use a boolean in the wxMenu
     // to avoid search. Also we might make this fix unnecessary by getting the correct
     // margin using NONCLIENTMETRICS.
-    if ( !pItem->IsOwnerDrawn() )
+    if ( !pItem->IsOwnerDrawn() && !pItem->IsSeparator() )
     {
         // Check if any other items are ownerdrawn, and make ownerdrawn if so
         wxMenuItemList::compatibility_iterator node = GetMenuItems().GetFirst();