Update of /cvsroot/mahogany/M/src/gui
In directory usw-pr-cvs1:/tmp/cvs-serv26149/src/gui

Modified Files:
        wxMenuDefs.cpp 
Log Message:
fixed assert when adding separators to a popup menu

Index: wxMenuDefs.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/gui/wxMenuDefs.cpp,v
retrieving revision 1.183
retrieving revision 1.184
diff -b -u -2 -r1.183 -r1.184
--- wxMenuDefs.cpp      24 Mar 2002 01:24:48 -0000      1.183
+++ wxMenuDefs.cpp      29 Mar 2002 08:58:52 -0000      1.184
@@ -564,5 +564,9 @@
 void AppendToMenu(wxMenu *menu, int& n)
 {
-   int id = n > 0 ? GetMenuItem(n).idMenu : WXMENU_SEPARATOR;
+   if ( n == WXMENU_SEPARATOR ) {
+      menu->AppendSeparator();
+   }
+   else {
+      int id = GetMenuItem(n).idMenu;
    if ( id == WXMENU_SUBMENU ) {
       // append all entries until the next one with id == WXMENU_SUBMENU to a
@@ -590,4 +594,5 @@
                    wxGetTranslation(mii.helpstring),
                    mii.kind);
+      }
    }
 }


_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates

Reply via email to