From 400360cb34e5efc699d14823fc70090828d90939 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Mon, 19 Sep 2016 15:05:33 +0200 Subject: [PATCH] Add check if additional components were successfully created --- DiscoverUM3Action.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/DiscoverUM3Action.py b/DiscoverUM3Action.py index 854e40e387..0d8c0ad060 100644 --- a/DiscoverUM3Action.py +++ b/DiscoverUM3Action.py @@ -112,7 +112,11 @@ class DiscoverUM3Action(MachineAction): # We need access to engine (although technically we can't) self.__additional_components_context = QQmlContext(Application.getInstance()._engine.rootContext()) self.__additional_components_context.setContextProperty("manager", self) + self.__additional_components_view = self.__additional_component.create(self.__additional_components_context) + if not self.__additional_components_view: + Logger.log("w", "Could not create ui components for UM3.") + return Application.getInstance().addAdditionalComponent("monitorButtons", self.__additional_components_view.findChild(QObject, "networkPrinterConnectButton")) Application.getInstance().addAdditionalComponent("machinesDetailPane", self.__additional_components_view.findChild(QObject, "networkPrinterConnectionInfo"))