From: nickthetait Date: Fri, 23 Oct 2015 17:36:35 +0000 (-0600) Subject: Wxpython 2.8 tweaks for T289 X-Git-Tag: lulzbot-17.11~7 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=cura.git;a=commitdiff_plain;h=e4f092becc3411d03522aac7ceab51fa5961722e Wxpython 2.8 tweaks for T289 --- diff --git a/Cura/gui/simpleMode.py b/Cura/gui/simpleMode.py index 130aff05..75c7d925 100644 --- a/Cura/gui/simpleMode.py +++ b/Cura/gui/simpleMode.py @@ -183,14 +183,15 @@ class simpleModePanel(wx.Panel): selection = self.materialTypeCombo.GetSelection() choices = [] - if selection >= len(self._print_material_types.keys()): + if selection >= len(self._print_material_types.keys()) or \ + selection == -1: materials = self._all_print_materials for material in materials: choices.append(material.full_name) 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 @@ -219,7 +220,8 @@ class simpleModePanel(wx.Panel): materialType = self.materialTypeCombo.GetValue() selection = self.materialTypeCombo.GetSelection() - if selection >= len(self._print_material_types.keys()): + if selection >= len(self._print_material_types.keys()) or \ + selection == -1: materials = self._all_print_materials else: materials = self._print_material_types[materialType]