[longomatch] Fix exception when start equals stop
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch] Fix exception when start equals stop
- Date: Wed, 8 Feb 2012 00:09:08 +0000 (UTC)
commit 4924434a45e203ee4f26149a971cf448511be9f5
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Wed Feb 8 01:07:26 2012 +0100
Fix exception when start equals stop
LongoMatch.Addins.COE/TimelineSheet.cs | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/LongoMatch.Addins.COE/TimelineSheet.cs b/LongoMatch.Addins.COE/TimelineSheet.cs
index d566653..57a576f 100644
--- a/LongoMatch.Addins.COE/TimelineSheet.cs
+++ b/LongoMatch.Addins.COE/TimelineSheet.cs
@@ -118,7 +118,11 @@ public class TimelineSheet
stop = TIMELINE_START + unit.Stop.Seconds / (float) 60;
ws.Cells[row, (int) start].Value = stop - start;
- cols = ws.Cells[row, (int)start, row, (int)stop];
+
+ if ((int)start == (int)stop)
+ cols = ws.Cells [row, (int) start];
+ else
+ cols = ws.Cells[row, (int)start, row, (int)stop];
cols.Style.Fill.PatternType = ExcelFillStyle.Solid;
cols.Style.Fill.BackgroundColor.SetColor(Color.Green);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]