From: Youness Alaoui Date: Thu, 29 Oct 2015 18:02:11 +0000 (-0400) Subject: Remove unnecessary code X-Git-Tag: lulzbot-17.12~4 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=c6ceb18f388b67468036a54d0933c74270a88dc1;p=cura.git Remove unnecessary code --- 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: