Fix broken import with DefinitionContainerInterface

And the ensuing type error that can then be found.

Contributes to issue CURA-5330.
This commit is contained in:
Ghostkeeper 2018-06-15 14:31:29 +02:00
parent 0d52b03716
commit 2b33a1f1b6
No known key found for this signature in database
GPG key ID: 5252B696FB5E7C7A

View file

@ -18,7 +18,7 @@ from UM.Resources import Resources
from UM.Platform import Platform
from UM.Qt.Duration import DurationFormat
from UM.Scene.Iterator.DepthFirstIterator import DepthFirstIterator
from UM.Settings.DefinitionContainerInterface import DefinitionContainerInterface
from UM.Settings.Interfaces import DefinitionContainerInterface
from UM.Settings.SettingInstance import SettingInstance #For typing.
from UM.Tool import Tool #For typing.
@ -365,8 +365,7 @@ class CuraEngineBackend(QObject, Backend):
if not definition:
Logger.log("e", "When checking settings for errors, unable to find definition for key {key} in per-object stack.".format(key = key))
continue
definition = definition[0]
errors[key] = definition.label
errors[key] = definition[0].label
self._error_message = Message(catalog.i18nc("@info:status", "Unable to slice due to some per-model settings. The following settings have errors on one or more models: {error_labels}").format(error_labels = ", ".join(errors.values())),
title = catalog.i18nc("@info:title", "Unable to slice"))
self._error_message.show()