mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-15 02:37:49 -06:00
Let _fetchInstanceContainers return containers split by loaded or not
It must now return two dictionaries: One for the profiles that have been completely loaded and one for the profiles that are only metadata. We could probably improve on these a little bit, since all of these (except the material model) will now load all available quality profiles. I'll see if it is necessary to optimise that. Contributes to issue CURA-4243.
This commit is contained in:
parent
e5427eded6
commit
eb3981b4e0
3 changed files with 17 additions and 15 deletions
|
@ -53,7 +53,7 @@ class ProfilesModel(InstanceContainersModel):
|
|||
def _fetchInstanceContainers(self):
|
||||
global_container_stack = Application.getInstance().getGlobalContainerStack()
|
||||
if global_container_stack is None:
|
||||
return []
|
||||
return {}, {}
|
||||
global_stack_definition = global_container_stack.getBottom()
|
||||
|
||||
# Get the list of extruders and place the selected extruder at the front of the list.
|
||||
|
@ -83,7 +83,7 @@ class ProfilesModel(InstanceContainersModel):
|
|||
if quality.getMetaDataEntry("quality_type") not in quality_type_set:
|
||||
result.append(quality)
|
||||
|
||||
return result
|
||||
return {item.getId():item for item in result}, {}
|
||||
|
||||
## Re-computes the items in this model, and adds the layer height role.
|
||||
def _recomputeItems(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue