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

Repaired Views dropdown in Preview stage #745

Merged
merged 3 commits into from
Nov 8, 2021

Conversation

Tyronnosaurus
Copy link
Contributor

@Tyronnosaurus Tyronnosaurus commented Oct 27, 2021

(for plugins with 2 views or more)

If a view has a _name, its ID is not PluginName but rather PluginName_ViewName. This is necessary to give unique IDs to each view in a plugin that has multiple views. However, it breaks this line:

   view_meta_data = PluginRegistry.getInstance().getMetaData(view_id).get("view", {})

because it tries to look for a plugin called PluginName_ViewName.

More info in Cura forums thread & issue #744.

(for plugins with 2 views or more)
UM/Qt/Bindings/ViewModel.py Outdated Show resolved Hide resolved
Tyronnosaurus and others added 2 commits October 28, 2021 17:35
Co-authored-by: Jaime van Kessel <nallath@gmail.com>
Metadata can no longer be a list of dicts.
@Tyronnosaurus
Copy link
Contributor Author

@nallath, your change request was great. Since we now get a metadata dict directly from each View object (instead of dicts/lists of dicts from every plugin) we no longer need to check for and process any list of dicts.
This removes the need to have the same value in 'name' metadata and View._name.

@nallath nallath merged commit 817ff7f into Ultimaker:master Nov 8, 2021
@nallath
Copy link
Member

nallath commented Nov 8, 2021

Sorry it took me so long to re-review / test the changes! Somehow i missed the notification that you applied the changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants