From c6ceb18f388b67468036a54d0933c74270a88dc1 Mon Sep 17 00:00:00 2001 From: Youness Alaoui Date: Thu, 29 Oct 2015 14:02:11 -0400 Subject: [PATCH] Remove unnecessary code --- Cura/gui/simpleMode.py | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/Cura/gui/simpleMode.py b/Cura/gui/simpleMode.py index 75c7d925..34a07334 100644 --- a/Cura/gui/simpleMode.py +++ b/Cura/gui/simpleMode.py @@ -78,8 +78,7 @@ class simpleModePanel(wx.Panel): selectedMaterialType = material_type if selectedMaterialType is None: - if profile.getProfileSetting('simpleModeMaterialType') == _("Others") or \ - profile.getProfileSetting('simpleModeMaterialType') == _("All"): + if profile.getProfileSetting('simpleModeMaterialType') == _("All"): selectedMaterialType = profile.getProfileSetting('simpleModeMaterialType') elif selectedMaterial is None or len(selectedMaterial.types) == 0: selectedMaterialType = _("Others") @@ -191,7 +190,7 @@ class simpleModePanel(wx.Panel): else: materials = self._print_material_types[materialType] for material in materials: - choices.append(material.name) + choices.append(material.name) # Decide on the default selected material selectedMaterial = None @@ -228,14 +227,6 @@ class simpleModePanel(wx.Panel): selection = self.materialCombo.GetSelection() - # This is needed to avoid a wxpython 2.8 bug which returns -1 - # when the selection is made with SetValue - if selection == -1: - material_name = self.materialCombo.GetValue() - for material in materials: - if material.name == material_name: - return material - return materials[selection] else: for button in self._print_material_options: -- 2.30.2