From 0047874f030cbdeb479d725b2f52124a30520b66 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Thu, 4 Jul 2019 12:35:11 +0200 Subject: [PATCH] Get translation from list of keys rather than items Because the category is not in a list of tuples. It's just the key of the dict. Contributes to issue CURA-6597. --- cura/Machines/Models/IntentCategoryModel.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cura/Machines/Models/IntentCategoryModel.py b/cura/Machines/Models/IntentCategoryModel.py index c7484808ee..53193bd73d 100644 --- a/cura/Machines/Models/IntentCategoryModel.py +++ b/cura/Machines/Models/IntentCategoryModel.py @@ -58,6 +58,6 @@ class IntentCategoryModel(ListModel): result.append({ "name": self.name_translation.get(category, catalog.i18nc("@label", "Unknown")), "intent_category": category, - "weight": list(self.name_translation.items()).index(category) + "weight": list(self.name_translation.keys()).index(category) }) super().update(result) \ No newline at end of file