changeset 493:6b0ca39025ed

Re #423: Support nested units in GTK UI * Swap order of removing unit from parent so that we validation at the appropriate time
author IBBoard <dev@ibboard.co.uk>
date Mon, 06 Aug 2012 20:44:26 +0100
parents 4e1895ef9269
children 4f01fdc3bb41
files API/Commands/CreateAndAddUnitCommand.cs
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/API/Commands/CreateAndAddUnitCommand.cs	Sun Aug 05 20:55:35 2012 +0100
+++ b/API/Commands/CreateAndAddUnitCommand.cs	Mon Aug 06 20:44:26 2012 +0100
@@ -64,8 +64,8 @@
 
 		public override void Undo()
 		{
+			addedUnit.ParentUnit = null;
 			armyCat.RemoveUnit(addedUnit);
-			addedUnit.ParentUnit = null;
 		}
 
 		public override string Name