From: Youness Alaoui Date: Mon, 14 Sep 2015 16:49:49 +0000 (-0400) Subject: Fix wxpython 2.8 bug for quickprint selection X-Git-Tag: lulzbot-17.04~6 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=157831e31a4e48520bff7357daf755776f24bfa4;p=cura.git Fix wxpython 2.8 bug for quickprint selection --- diff --git a/Cura/gui/simpleMode.py b/Cura/gui/simpleMode.py index ccd31691..0924322f 100644 --- a/Cura/gui/simpleMode.py +++ b/Cura/gui/simpleMode.py @@ -223,6 +223,14 @@ 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: