From d0e3caacf4ff0ac0e4576ddde0133c62a02e5269 Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Tue, 15 Dec 2020 17:56:44 +0100 Subject: [PATCH] moved registering of action to different spot because it cases huge issues when happens in `tray_start` --- pype/modules/launcher_action.py | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/pype/modules/launcher_action.py b/pype/modules/launcher_action.py index bc6ad507c4..9c2120cf9a 100644 --- a/pype/modules/launcher_action.py +++ b/pype/modules/launcher_action.py @@ -16,17 +16,18 @@ class LauncherAction(PypeModule, ITrayAction): self.create_window() def tray_start(self): - # Register actions - from pype.tools.launcher import actions - # actions.register_default_actions() - actions.register_config_actions() - actions_paths = self.manager.collect_plugin_paths()["actions"] - actions.register_actions_from_paths(actions_paths) - actions.register_environment_actions() - - def connect_with_modules(self, _enabled_modules): return + def connect_with_modules(self, enabled_modules): + # Register actions + if self.tray_initialized: + from pype.tools.launcher import actions + # actions.register_default_actions() + actions.register_config_actions() + actions_paths = self.manager.collect_plugin_paths()["actions"] + actions.register_actions_from_paths(actions_paths) + actions.register_environment_actions() + def create_window(self): if self.window: return