comparison FrmMainWindow.cs @ 14:abbf8a3ac431

Re #90: Stop new units showing up twice * Pass ArmyCategory to CreateAndAddUnitCommand
author IBBoard <dev@ibboard.co.uk>
date Sat, 27 Jun 2009 19:39:41 +0000
parents 6b2c8e55564a
children 85db2c9a1546
comparison
equal deleted inserted replaced
13:6b2c8e55564a 14:abbf8a3ac431
409 ResponseType response = (ResponseType)newUnit.Run(); 409 ResponseType response = (ResponseType)newUnit.Run();
410 newUnit.Hide(); 410 newUnit.Hide();
411 411
412 if (response==ResponseType.Ok) 412 if (response==ResponseType.Ok)
413 { 413 {
414 CreateAndAddUnitCommand cmd = new CreateAndAddUnitCommand(newUnit.SelectedUnit, WarFoundryCore.CurrentArmy); 414 CreateAndAddUnitCommand cmd = new CreateAndAddUnitCommand(newUnit.SelectedUnit, WarFoundryCore.CurrentArmy.GetCategory(cat));
415 commandStack.Execute(cmd); 415 commandStack.Execute(cmd);
416 } 416 }
417 417
418 newUnit.Dispose(); 418 newUnit.Dispose();
419 } 419 }