From c2974a722c5fb282e0654f59ccad744bc71574d4 Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Thu, 21 Dec 2023 09:15:02 +0800 Subject: [PATCH] Update menu construction on web. --- web/src/toga_web/app.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/web/src/toga_web/app.py b/web/src/toga_web/app.py index 4d7015b8eb..2a10cb5eb1 100644 --- a/web/src/toga_web/app.py +++ b/web/src/toga_web/app.py @@ -1,5 +1,5 @@ import toga -from toga.command import GROUP_BREAK, SECTION_BREAK +from toga.command import Separator from toga_web.libs import create_element, js from toga_web.window import Window @@ -66,9 +66,7 @@ def create_menus(self): submenu = None for cmd in self.interface.commands: - if cmd == GROUP_BREAK: - submenu = None - elif cmd == SECTION_BREAK: + if isinstance(cmd, Separator): # TODO - add a section break pass else: