Mercurial > repos > IBDev-IBBoard.WarFoundry.GUI.WinForms
comparison UI/EquipmentAmountControl.cs @ 107:775a34b78051
Fixes #225: Equipment amount control occasionally disables all options
* Make sure we re-enable the control when we have a non-null equipment item since we disable it when we have a null item
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Sat, 28 Nov 2009 16:33:26 +0000 |
parents | e598c0d2584d |
children | c1a3993297b1 |
comparison
equal
deleted
inserted
replaced
106:3fae39208d06 | 107:775a34b78051 |
---|---|
52 private void SetWidgetValues() | 52 private void SetWidgetValues() |
53 { | 53 { |
54 if (equip != null) | 54 if (equip != null) |
55 { | 55 { |
56 IgnoreWidgets(); | 56 IgnoreWidgets(); |
57 | |
58 Enabled = true; | |
57 | 59 |
58 log.Debug("Equipment update"); | 60 log.Debug("Equipment update"); |
59 bool equipIsRatioLimit = UnitEquipmentUtil.IsEquipmentRatioLimited(unit, equip); | 61 bool equipIsRatioLimit = UnitEquipmentUtil.IsEquipmentRatioLimited(unit, equip); |
60 log.Debug("Equipment is ratio? " + (equipIsRatioLimit ? "yes" : "no")); | 62 log.Debug("Equipment is ratio? " + (equipIsRatioLimit ? "yes" : "no")); |
61 double maxPercent = RoundPercentage(UnitEquipmentUtil.GetMaxEquipmentPercentage(unit, equip)); | 63 double maxPercent = RoundPercentage(UnitEquipmentUtil.GetMaxEquipmentPercentage(unit, equip)); |