From 5bb9ebee6365ea57f88c2d6e13faffaafe5f3878 Mon Sep 17 00:00:00 2001 From: Loren Eteval Date: Tue, 5 Sep 2023 11:00:12 +0800 Subject: [PATCH] Update Menu in Widget.py Signed-off-by: Loren Eteval --- Furious/Widget/Widget.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Furious/Widget/Widget.py b/Furious/Widget/Widget.py index e131613..5e488f4 100644 --- a/Furious/Widget/Widget.py +++ b/Furious/Widget/Widget.py @@ -149,10 +149,11 @@ class Menu(Translatable, SupportConnectedCallback, QMenu): for action in actions: if isinstance(action, Seperator): self.addSeparator() - else: - assert isinstance(action, Action) - + elif isinstance(action, Action): self.addAction(action) + else: + # Do nothing + pass if APP().tray is not None and APP().tray.ConnectAction.isConnected(): self.setStyleSheet(self.getStyleSheet(Color.LIGHT_RED_))