[longomatch] Add more fixes for the game units



commit a97d19b2acc3d1b459cb504306923ca36f14f0e5
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Wed Feb 8 01:48:21 2012 +0100

    Add more fixes for the game units

 LongoMatch.Addins.COE/TimelineSheet.cs |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/LongoMatch.Addins.COE/TimelineSheet.cs b/LongoMatch.Addins.COE/TimelineSheet.cs
index 57a576f..489d0cf 100644
--- a/LongoMatch.Addins.COE/TimelineSheet.cs
+++ b/LongoMatch.Addins.COE/TimelineSheet.cs
@@ -106,7 +106,7 @@ public class TimelineSheet
 			ExcelRange cols;
 			
 			SetColoredHeaders(ws, row, gu.Name, 3, 5, Color.DeepSkyBlue, true);
-			cols = ws.Cells[row, TIMELINE_START, row, duration];
+			cols = ws.Cells[row, TIMELINE_START, row, TIMELINE_START + duration];
 			cols.Style.Fill.PatternType = ExcelFillStyle.Solid;
 			cols.Style.Fill.BackgroundColor.SetColor(Color.Red);
 			cols.Dispose();
@@ -119,6 +119,8 @@ public class TimelineSheet
 				
 				ws.Cells[row, (int) start].Value = stop - start;
 				
+				if (start > stop)
+					continue;
 				if ((int)start == (int)stop)
 					cols = ws.Cells [row, (int) start];
 				else



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]