From 4f212f04b589696ba84ebf6a2368d2d73d7a7fef Mon Sep 17 00:00:00 2001 From: Pieter de Bie Date: Thu, 9 Oct 2008 21:34:06 +0200 Subject: [PATCH] CommitView: Remove checking if same file is displayed This causes trouble if a file was partially staged, or if we switch from the staged changes to the unstaged changes. It should be quick enough not to matter anyway, so let's simplify things and remove the check. --- PBWebChangesController.h | 2 -- PBWebChangesController.m | 6 ------ 2 files changed, 8 deletions(-) diff --git a/PBWebChangesController.h b/PBWebChangesController.h index de934cc..89eb554 100644 --- a/PBWebChangesController.h +++ b/PBWebChangesController.h @@ -15,8 +15,6 @@ IBOutlet NSArrayController *unstagedFilesController; IBOutlet NSArrayController *cachedFilesController; IBOutlet PBGitCommitController *controller; - - id previousFile; } - (void) showDiff:(PBChangedFile *)file cached:(BOOL)cached; diff --git a/PBWebChangesController.m b/PBWebChangesController.m index e6cb917..d3ba89f 100644 --- a/PBWebChangesController.m +++ b/PBWebChangesController.m @@ -58,12 +58,6 @@ static PBChangedFile *lastFileSelected = nil; return; } - // Don't reload if we already display this file - if (previousFile == file) - return; - - previousFile = file; - id script = [view windowScriptObject]; NSLog(@"Showing diff.."); [script callWebScriptMethod:@"showFileChanges" withArguments:[NSArray arrayWithObjects:file, [NSNumber numberWithBool:cached], nil]];