From 6bb82eeefeb02f5522db6be5bcb7bdb7247925a2 Mon Sep 17 00:00:00 2001 From: Jack Ha Date: Tue, 15 Nov 2016 11:42:08 +0100 Subject: [PATCH] Fix problem registering Actions.qml which resulted in empty menu items. --- cura/CuraApplication.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index 532a60b58c..80fee88201 100644 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -558,7 +558,9 @@ class CuraApplication(QtApplication): qmlRegisterSingletonType(cura.Settings.ContainerManager, "Cura", 1, 0, "ContainerManager", cura.Settings.ContainerManager.createContainerManager) - qmlRegisterSingletonType(QUrl.fromLocalFile(Resources.getPath(CuraApplication.ResourceTypes.QmlFiles, "Actions.qml")), "Cura", 1, 0, "Actions") + # As of Qt5.7, it is necessary to get rid of any ".." in the path for the singleton to work. + actions_url = QUrl.fromLocalFile(os.path.abspath(Resources.getPath(CuraApplication.ResourceTypes.QmlFiles, "Actions.qml"))) + qmlRegisterSingletonType(actions_url, "Cura", 1, 0, "Actions") engine.rootContext().setContextProperty("ExtruderManager", cura.Settings.ExtruderManager.getInstance())