From 8d133988eb9f8e3ebf21459014ea73189f3f053c Mon Sep 17 00:00:00 2001 From: Loren Eteval Date: Tue, 5 Sep 2023 11:00:12 +0800 Subject: [PATCH] Refine widget menus 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 e1316135..5e488f48 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_))