Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MaterialsPage.qml still uses CuraApplication.getMaterialManager #7

Closed
bredeker opened this issue Dec 23, 2019 · 2 comments
Closed

MaterialsPage.qml still uses CuraApplication.getMaterialManager #7

bredeker opened this issue Dec 23, 2019 · 2 comments
Labels
bug Something isn't working

Comments

@bredeker
Copy link

After installing this plug-in on Cura 4.4, I noticed I was not able to duplicate Material profiles, and the following was logged when I clicked the respective button:

2019-12-23 00:19:16,951 - WARNING - [MainThread] UM.Qt.QtApplication.__onQmlWarning [369]: file:[…]/cura/4.4/plugins/MaterialSettingsPlugin/MaterialSettingsPlugin/qml/MaterialPreferences/MaterialsPage.qml:132: TypeError: Property 'getMaterialManager' of object CuraApplication(0x600003ce43c0) is not a function

Based on PR #4, it looks like getMaterialManager was removed in the latest API, but the references to it in MaterialsPage.qml were missed. I was able to fix the problem (from what I can tell) by duplicating the materialManager property definition from commit 87655d2 and replacing calls to CuraApplication.getMaterialManager with calls to that property. Redundant declarations across the two files do not seem like a good long-term fix, so I do not think my hack has good value as a PR. I have no prior experience with QML and am not sure what the best practice is, so I thought I would at least submit the issue and let a more experienced hand craft an official solution.

@fieldOfView
Copy link
Owner

Good catch. This causes Ultimaker/Cura#6864

The complication in fixing this, is that the plugin must also still work with previous versions of Cura. I'll get on it.

@fieldOfView
Copy link
Owner

This should be fixed in 9ca0c6d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants