From 1fecc0a7cf8fecf7d1b1d205aab3e74e602e2bf8 Mon Sep 17 00:00:00 2001 From: Ottermandias Date: Thu, 27 Jul 2023 18:47:17 +0200 Subject: [PATCH] Fix selecting None for Stain. --- Glamourer/Gui/Equipment/EquipmentDrawer.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Glamourer/Gui/Equipment/EquipmentDrawer.cs b/Glamourer/Gui/Equipment/EquipmentDrawer.cs index 533ba82..0d070a3 100644 --- a/Glamourer/Gui/Equipment/EquipmentDrawer.cs +++ b/Glamourer/Gui/Equipment/EquipmentDrawer.cs @@ -260,8 +260,11 @@ public class EquipmentDrawer ? _stainCombo.Draw($"##stain{slot}", stain.RgbaColor, stain.Name, found, stain.Gloss) : _stainCombo.Draw($"##stain{slot}", stain.RgbaColor, stain.Name, found, stain.Gloss, _comboLength); ret = current; - if (change && _stainData.TryGetValue(_stainCombo.CurrentSelection.Key, out stain)) - ret = stain.RowIndex; + if (change) + if (_stainData.TryGetValue(_stainCombo.CurrentSelection.Key, out stain)) + ret = stain.RowIndex; + else if (_stainCombo.CurrentSelection.Key == Stain.None.RowIndex) + ret = Stain.None.RowIndex; if (!locked && ret != Stain.None.RowIndex) {