mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-10 16:27:51 -06:00
Show user profiles based on Not Supported
CURA-4807
This commit is contained in:
parent
abece3c415
commit
8a570c4b01
3 changed files with 13 additions and 2 deletions
|
@ -2,6 +2,8 @@
|
|||
# Cura is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
from UM.Application import Application
|
||||
from UM.Settings.ContainerRegistry import ContainerRegistry
|
||||
|
||||
from cura.QualityManager import QualityManager
|
||||
from cura.Settings.ProfilesModel import ProfilesModel
|
||||
from cura.Settings.ExtruderManager import ExtruderManager
|
||||
|
@ -22,6 +24,8 @@ class UserProfilesModel(ProfilesModel):
|
|||
for material in self.__current_materials:
|
||||
material.metaDataChanged.connect(self._onContainerChanged)
|
||||
|
||||
self._empty_quality = ContainerRegistry.getInstance().findContainers(id = "empty_quality")[0]
|
||||
|
||||
## Fetch the list of containers to display.
|
||||
#
|
||||
# See UM.Settings.Models.InstanceContainersModel._fetchInstanceContainers().
|
||||
|
@ -45,6 +49,7 @@ class UserProfilesModel(ProfilesModel):
|
|||
|
||||
# Filter the quality_change by the list of available quality_types
|
||||
quality_type_set = set([x.getMetaDataEntry("quality_type") for x in quality_list])
|
||||
quality_type_set.add(self._empty_quality.getMetaDataEntry("quality_type"))
|
||||
|
||||
filtered_quality_changes = {qc.getId():qc for qc in quality_changes_list if
|
||||
qc.getMetaDataEntry("quality_type") in quality_type_set and
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue