Fixed memory leaks

Introduced Sorting
This commit is contained in:
michael starke
2013-05-11 23:56:49 +02:00
parent e33545a1de
commit ca4b8ee946
7 changed files with 71 additions and 5 deletions

View File

@@ -22,6 +22,7 @@
@property (retain) NSMenu *menu;
- (void)_didUpdateData:(NSNotification *)notification;
- (NSMenu *)_contextMenu;
- (KdbGroup *)_clickedOrSelectedGroup;
@@ -38,6 +39,18 @@
if (self) {
self.outlineDelegate = [[[MPOutlineViewDelegate alloc] init] autorelease];
self.datasource = [[[MPOutlineDataSource alloc] init] autorelease];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(_didUpdateData:)
name:MPDocumentDidAddGroupNotification
object:[[self windowController] document]];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(_didUpdateData:)
name:MPDocumentDidDelteGroupNotification
object:[[self windowController] document]];
}
return self;
@@ -116,5 +129,9 @@
return [self.outlineView itemAtRow:row];
}
- (void)_didUpdateData:(NSNotification *)notification {
[self.outlineView reloadData];
}
@end