]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/wx/tools/XRCed/tree.py
Warning fix.
[wxWidgets.git] / wxPython / wx / tools / XRCed / tree.py
index 77a86720debe77db0921b804d712bc614c07cf48..0e78ba4844121a7545687b52dfaf92f86eca3408 100644 (file)
@@ -653,9 +653,9 @@ class XML_Tree(wxTreeCtrl):
         # Top-level sizer? return window's sizer
         if xxx.isSizer and isinstance(parentWin, wxWindow):
             return parentWin.GetSizer()
         # Top-level sizer? return window's sizer
         if xxx.isSizer and isinstance(parentWin, wxWindow):
             return parentWin.GetSizer()
-        elif isinstance(xxx, xxxStatusBar):  return None
-        elif isinstance(xxx, xxxToolBar):
-            # If it's the main toolbar, we can't really select it
+        elif xxx.__class__ in [xxxStatusBar, xxxMenu, xxxMenuItem, xxxSeparator]:  return None
+        elif xxx.__class__ in [xxxToolBar, xxxMenuBar]:
+            # If it's the main toolbar or menubar, we can't really select it
             if xxx.parent.__class__ == xxxFrame:  return None
         elif isinstance(xxx.parent, xxxToolBar):
             # Select complete toolbar
             if xxx.parent.__class__ == xxxFrame:  return None
         elif isinstance(xxx.parent, xxxToolBar):
             # Select complete toolbar