From a0b11cfed1ce759bee338585ab2a62365d36f1c6 Mon Sep 17 00:00:00 2001 From: Nathan Kinsinger Date: Sat, 27 Feb 2010 13:10:46 -0700 Subject: [PATCH] Remove the observers from the ref controller The ref controller is no longer responsible for updating the commit controller. --- PBRefController.m | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/PBRefController.m b/PBRefController.m index ebddf1a..d3b183b 100644 --- a/PBRefController.m +++ b/PBRefController.m @@ -19,21 +19,6 @@ - (void)awakeFromNib { [commitList registerForDraggedTypes:[NSArray arrayWithObject:@"PBGitRef"]]; - [historyController addObserver:self forKeyPath:@"repository.branches" options:0 context:@"branchChange"]; - [historyController addObserver:self forKeyPath:@"repository.currentBranch" options:0 context:@"currentBranchChange"]; -} - -- (void) observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context -{ - if ([(NSString *)context isEqualToString: @"branchChange"]) { - [commitController rearrangeObjects]; - } - else if ([(NSString *)context isEqualToString:@"currentBranchChange"]) { - [commitController rearrangeObjects]; - } - else { - [super observeValueForKeyPath:keyPath ofObject:object change:change context:context]; - } } @@ -272,7 +257,6 @@ if (returnCode == NSAlertDefaultReturn) { PBGitRef *ref = (PBGitRef *)contextInfo; [historyController.repository deleteRef:ref]; - [commitController rearrangeObjects]; } } @@ -347,8 +331,6 @@ [dropCommit addRef:ref]; [oldCommit removeRef:ref]; - - [commitController rearrangeObjects]; } - (BOOL)tableView:(NSTableView *)aTableView