From a66ae7c1e7990aa76cee4b566437e4e9f5d8485c Mon Sep 17 00:00:00 2001 From: Pieter de Bie Date: Fri, 3 Oct 2008 18:27:12 +0200 Subject: [PATCH] Grapher: Always reset colors at start of graphing --- PBGitGrapher.m | 1 + PBGitLane.h | 2 ++ PBGitLane.m | 6 ++++++ 3 files changed, 9 insertions(+) diff --git a/PBGitGrapher.m b/PBGitGrapher.m index 2fad4dd..f3af7ae 100644 --- a/PBGitGrapher.m +++ b/PBGitGrapher.m @@ -17,6 +17,7 @@ refs = repo.refs; repository = repo; previousLanes = [NSMutableArray array]; + [PBGitLane resetColors]; return self; } diff --git a/PBGitLane.h b/PBGitLane.h index dc5aa12..ab89cbb 100644 --- a/PBGitLane.h +++ b/PBGitLane.h @@ -15,6 +15,8 @@ - (id) initWithCommit: (NSString*) c; - (BOOL) isCommit: (NSString*) c; ++ (void) resetColors; + @property(assign) NSString* sha; @property(readonly) int index; diff --git a/PBGitLane.m b/PBGitLane.m index 05dabe8..2d80d94 100644 --- a/PBGitLane.m +++ b/PBGitLane.m @@ -14,6 +14,12 @@ static int PBGITLANE_CURRENT_INDEX = 0; @synthesize sha, index; + ++ (void) resetColors +{ + PBGITLANE_CURRENT_INDEX = 0; +} + - (id) initWithCommit: (NSString*) c { index = PBGITLANE_CURRENT_INDEX++;