From: Youness Alaoui Date: Fri, 23 Oct 2015 16:25:36 +0000 (-0400) Subject: Save the material type so the right value is restored when opening cura X-Git-Tag: lulzbot-17.11~9 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=f74383373e20f7c5b9ca0e8806455b775cd6c265;p=cura.git Save the material type so the right value is restored when opening cura Fixes T289 --- diff --git a/Cura/gui/simpleMode.py b/Cura/gui/simpleMode.py index 0924322f..130aff05 100644 --- a/Cura/gui/simpleMode.py +++ b/Cura/gui/simpleMode.py @@ -78,7 +78,10 @@ class simpleModePanel(wx.Panel): selectedMaterialType = material_type if selectedMaterialType is None: - if selectedMaterial is None or len(selectedMaterial.types) == 0: + if profile.getProfileSetting('simpleModeMaterialType') == _("Others") or \ + profile.getProfileSetting('simpleModeMaterialType') == _("All"): + selectedMaterialType = profile.getProfileSetting('simpleModeMaterialType') + elif selectedMaterial is None or len(selectedMaterial.types) == 0: selectedMaterialType = _("Others") else: selectedMaterialType = selectedMaterial.types[0] @@ -352,6 +355,9 @@ class simpleModePanel(wx.Panel): self._update(e) def _update(self, e): + if self.materialTypeCombo: + materialType = self.materialTypeCombo.GetValue() + profile.putProfileSetting('simpleModeMaterialType', materialType) material = self._getSelectedMaterial() if material: profile.putProfileSetting('simpleModeMaterial', material.name)