mirror of
https://github.com/kennethreitz-archive/gitx.git
synced 2026-06-05 23:40:18 +00:00
IndexController: Add methods to stop tracking the Index
This is useful when changing large portions of the index at once, as refreshing the tables in those cases can become a large burden.
This commit is contained in:
@@ -12,6 +12,11 @@
|
||||
|
||||
#define FileChangesTableViewType @"GitFileChangedType"
|
||||
|
||||
@interface PBGitIndexController (PrivateMethods)
|
||||
- (void)stopTrackingIndex;
|
||||
- (void)resumeTrackingIndex;
|
||||
@end
|
||||
|
||||
@implementation PBGitIndexController
|
||||
|
||||
@synthesize contextSize;
|
||||
@@ -386,4 +391,17 @@ writeRowsWithIndexes:(NSIndexSet *)rowIndexes
|
||||
return NO;
|
||||
}
|
||||
|
||||
#pragma mark Private Methods
|
||||
- (void)stopTrackingIndex
|
||||
{
|
||||
[stagedFilesController setAutomaticallyRearrangesObjects:NO];
|
||||
[unstagedFilesController setAutomaticallyRearrangesObjects:NO];
|
||||
}
|
||||
- (void)resumeTrackingIndex
|
||||
{
|
||||
[stagedFilesController setAutomaticallyRearrangesObjects:YES];
|
||||
[unstagedFilesController setAutomaticallyRearrangesObjects:YES];
|
||||
[stagedFilesController rearrangeObjects];
|
||||
[unstagedFilesController rearrangeObjects];
|
||||
}
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user