#90 closed defect (released)
Stop new units showing up twice
Reported by: | ibboard | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | WarFoundry 0.1 |
Component: | WarFoundry-GUIs | Version: | |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
Both the GTK# and WinForms GUIs currently duplicate any new unit that is added. This is only a visual duplication - they show up twice in the tree but only charged for once - but it should be resolved. It is probably caused by a change to the events fired when creating units.
Change History (9)
comment:1 Changed 11 years ago by
comment:2 Changed 11 years ago by
Owner: | ibboard deleted |
---|
Remove owner so that the team can more easily see bugs. Using default owners seems good at first but is bad practice when a team can be working on any part of the project.
comment:3 Changed 11 years ago by
(In r146) Re #90: Stop new units showing up twice
- Hand all of unit adding/removing down to category
- Refactor out OnFailedRequirement method in Army
- Make Army listen to and propogate FailedRequirement events from Units
- Add OnUnitAdded/Removed method to ArmyCategory that takes list of failures
- Remove direct reference to Army from Unit and go via ArmyCategory instead
comment:4 Changed 11 years ago by
comment:5 Changed 11 years ago by
comment:6 Changed 11 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Now fixed in API and GUI (as long as user isn't listening to source and propagated version!)
comment:8 Changed 10 years ago by
released: | 1 → yes |
---|
Mark released fixes as released using radio values
comment:9 Changed 10 years ago by
Resolution: | fixed → released |
---|
Mark fix as released under a previous version
Appears to be caused because Army.AddUnit calls UnitAdded as its last instruction with a list of failed requirements, but the method also calls ArmyCategory.AddUnit, which calls OnUnitAdded, which triggers up to the Army to make sure that anyone listening to just the army is notified.