Fix problem registering Actions.qml which resulted in empty menu items.

This commit is contained in:
Jack Ha 2016-11-15 11:42:08 +01:00
parent d8610d5e4a
commit 6bb82eeefe

View file

@ -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())