#111 closed defect (released)
"Replace Weapon" button doesn't always enable
Reported by: | ibboard | Owned by: | ibboard |
---|---|---|---|
Priority: | critical | Milestone: | WarFoundry 0.1 |
Component: | WarFoundry-GUI-WinForms | Version: | |
Keywords: | button enabled debug | Cc: | |
Blocked By: | Blocking: |
Description
In the WinForms "FrmUnit" (the form for showing unit details) there are two boxes for equipment: Required and optional. If a required item is in the same mutex group as something else then the "replace" button should enable when it is selected.
Currently the button remains disabled for the default "Empire" army and the Swordsmen unit when selecting the sword unless you are in debug mode and breakpoint the adding of equipment to unit types, at which point it knows that there is also a broadsword that they can swap to.
The breakpoints shouldn't be affecting anything as the data is loaded sequentially, but it seems to fix the behavious.
Attachments (2)
Change History (9)
Changed 10 years ago by
Attachment: | Empire.race added |
---|
Changed 10 years ago by
Attachment: | Warhammer5th.system added |
---|
Basic game system that matches Warhammer 5th edition
comment:1 Changed 10 years ago by
Owner: | set to ibboard |
---|---|
Status: | new → accepted |
Simple debugging output shows the case to be true - somehow, even though there should be one mutex group (group 1) with two items in it (sword and broadsword) there is one mutex group with one item in it. Further investigation is needed as to why.
comment:2 Changed 10 years ago by
Problem is caused by auto-generated IDs being the same between different items, so "does it already exist" check says "yes" for Broadsword when Sword was added first.
comment:3 Changed 10 years ago by
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
comment:4 Changed 10 years ago by
(In r167) Re #111: "Replace" button doesn't always enable
- Implement better fix:
- Make UnitEquipmentItem ID based on unit type ID and equipment item ID
- Make UnitEquipmentItem require UnitType at construction again
- Remove setter from EquipmentItemForUnit
- Make AddEquipmentItem method internal so that the UnitEquipmentItem and not the factory is responsible for setting up the reverse link
no-open-ticket
comment:6 Changed 10 years ago by
released: | 1 → yes |
---|
Mark released fixes as released using radio values
comment:7 Changed 10 years ago by
Resolution: | fixed → released |
---|
Mark fix as released under a previous version
Simpe "Empire" army with swordsmen with weapon choices