Mercurial > repos > IBBoard.WarFoundry.GUI.WinForms
comparison FrmMain.cs @ 25:041f05e56496
Re #90: Stop new units showing up twice
* Pass ArmyCategory to CreateAndAddUnitCommand
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Sat, 27 Jun 2009 19:40:29 +0000 |
parents | b8de17271084 |
children | 526fefefb16b |
comparison
equal
deleted
inserted
replaced
24:7c366fe55635 | 25:041f05e56496 |
---|---|
1099 FrmNewUnit newUnit = new FrmNewUnit(CurrentArmy.Race, cat, CurrentArmy); | 1099 FrmNewUnit newUnit = new FrmNewUnit(CurrentArmy.Race, cat, CurrentArmy); |
1100 DialogResult dr = newUnit.ShowDialog(this); | 1100 DialogResult dr = newUnit.ShowDialog(this); |
1101 | 1101 |
1102 if (dr == DialogResult.OK) | 1102 if (dr == DialogResult.OK) |
1103 { | 1103 { |
1104 CreateAndAddUnitCommand cmd = new CreateAndAddUnitCommand(newUnit.SelectedUnit, CurrentArmy); | 1104 CreateAndAddUnitCommand cmd = new CreateAndAddUnitCommand(newUnit.SelectedUnit, CurrentArmy.GetCategory(cat)); |
1105 commandStack.Execute(cmd); | 1105 commandStack.Execute(cmd); |
1106 } | 1106 } |
1107 } | 1107 } |
1108 | 1108 |
1109 private void FrmMain_UnitAddedMethod(object unitObj) | 1109 private void FrmMain_UnitAddedMethod(object unitObj) |