From 157831e31a4e48520bff7357daf755776f24bfa4 Mon Sep 17 00:00:00 2001 From: Youness Alaoui Date: Mon, 14 Sep 2015 12:49:49 -0400 Subject: [PATCH] Fix wxpython 2.8 bug for quickprint selection --- Cura/gui/simpleMode.py | 8 ++++++++ 1 file changed, 8 insertions(+) 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: -- 2.30.2