Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#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 10 years ago by ibboard

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.

comment:2 Changed 10 years ago by ibboard

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 10 years ago by ibboard

(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 10 years ago by ibboard

(In r147) Re #90: Stop new units showing up twice

  • Pass ArmyCategory to CreateAndAddUnitCommand

comment:5 Changed 10 years ago by ibboard

(In r148) Re #90: Stop new units showing up twice

  • Pass ArmyCategory to CreateAndAddUnitCommand

comment:6 Changed 10 years ago by ibboard

Resolution: fixed
Status: newclosed

Now fixed in API and GUI (as long as user isn't listening to source and propagated version!)

comment:7 Changed 10 years ago by ibboard

released: 1

Mark released changes as released

comment:8 Changed 10 years ago by ibboard

released: 1yes

Mark released fixes as released using radio values

comment:9 Changed 10 years ago by ibboard

Resolution: fixedreleased

Mark fix as released under a previous version

Note: See TracTickets for help on using tickets.