diff --git a/studio/parsers/xml.py b/studio/parsers/xml.py index 943f8b0..554f24a 100644 --- a/studio/parsers/xml.py +++ b/studio/parsers/xml.py @@ -177,7 +177,10 @@ def _menu_from_xml(cls, node, menu=None, widget=None): if sub_node.tag in MenuConverter._types and menu is not None: menu.add(sub_node.tag) MenuTree.menu_config(menu, menu.index(tk.END), **attrib.get("menu", {})) - elif (obj_class := cls._get_class(sub_node)) == legacy.Menu: + return + + obj_class = cls._get_class(sub_node) + if obj_class == legacy.Menu: menu_obj = obj_class(widget, **attrib.get("attr", {})) if widget: widget.configure(menu=menu_obj)