Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#146 closed defect (released)

Incorrect logic in Unit.AddEquipmentAmount()

Reported by: ibboard Owned by: ibboard
Priority: major Milestone: WarFoundry 0.1
Component: WarFoundry-API Version:
Keywords: equipment amount Cc:
Blocked By: Blocking:

Description

The current logic in the Unit.AddEquipmentAmount() private method fails when setting an absolute value for a ratio item because it assumes the value is a ratio. This causes problems when swapping from a ratio amount to an absolute amount for equipment.

Change History (7)

comment:1 Changed 10 years ago by ibboard

(In r239) Fixes #117: Add percentage and number boxes to equipment item dialogs

  • Add value changing when changing radio button selection
  • Add logic to equipment amount editing control to perform value setting (but see #146)

Also, fixes #114 by rebuilding everything in to a single control

comment:2 Changed 10 years ago by ibboard

Owner: set to ibboard
Status: newaccepted

comment:3 Changed 10 years ago by ibboard

Logic actually appears to be correct - the check for "is it a ratio limited item" is valid and creates a "numeric amount for ratio limit" object. GUI output in WinForms definitely didn't seem right, though.

comment:4 Changed 10 years ago by ibboard

Resolution: fixed
Status: acceptedclosed

(In r240) Fixes #146: Incorrect logic in Unit.AddEquipmentAmount()

  • Logic error was in UnitEquipmentNumericForRatioSelection where we didn't treat percentages as decimal numbers and got ranges of "125 to 500" for a unit of 5!

comment:5 Changed 10 years ago by ibboard

released: 1

Mark released changes as released

comment:6 Changed 10 years ago by ibboard

released: 1yes

Mark released fixes as released using radio values

comment:7 Changed 10 years ago by ibboard

Resolution: fixedreleased

Mark fix as released under a previous version

Note: See TracTickets for help on using tickets.