Return empty model if there is no printer added yet

Contributes to issue CURA-6597.
This commit is contained in:
Ghostkeeper 2019-07-09 10:26:49 +02:00
parent 28f1e670f5
commit 07c5c4d9f0
No known key found for this signature in database
GPG key ID: 86BEF881AE2CF276

View file

@ -48,6 +48,8 @@ class IntentModel(ListModel):
application = cura.CuraApplication.CuraApplication.getInstance() application = cura.CuraApplication.CuraApplication.getInstance()
quality_manager = application.getQualityManager() quality_manager = application.getQualityManager()
global_stack = application.getGlobalContainerStack() global_stack = application.getGlobalContainerStack()
if not global_stack:
self.setItems(new_items)
for intent_category, quality_type in IntentManager.getInstance().currentAvailableIntents(): for intent_category, quality_type in IntentManager.getInstance().currentAvailableIntents():
if intent_category == self._intent_category: if intent_category == self._intent_category: