chiark / gitweb /
Remove unnecessary code
authorYouness Alaoui <kakaroto@kakaroto.homelinux.net>
Thu, 29 Oct 2015 18:02:11 +0000 (14:02 -0400)
committerYouness Alaoui <kakaroto@kakaroto.homelinux.net>
Thu, 29 Oct 2015 18:03:00 +0000 (14:03 -0400)
Cura/gui/simpleMode.py

index 75c7d9254c36cb0c2cfdd6140bf165a3dde1c19f..34a07334802c5e3d5b69d39d7058dcbcf7b09811 100644 (file)
@@ -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: