[#3] base cocoa: added selection synchronization with the py side.

--HG--
extra : convert_revision : svn%3Ac306627e-7827-47d3-bdf0-9a457c9553a1/trunk%4066
This commit is contained in:
hsoft 2009-06-16 09:07:33 +00:00
parent d30591fd39
commit 12482fed1b
3 changed files with 14 additions and 0 deletions

View File

@ -16,7 +16,9 @@
- (NSNumber *)doScan;
- (NSArray *)selectedPowerMarkerNodePaths;
- (void)selectPowerMarkerNodePaths:(NSArray *)aIndexPaths;
- (NSArray *)selectedResultNodePaths;
- (void)selectResultNodePaths:(NSArray *)aIndexPaths;
- (void)toggleSelectedMark;

View File

@ -30,6 +30,7 @@
/* Helpers */
- (NSArray *)getSelected:(BOOL)aDupesOnly;
- (NSArray *)getSelectedPaths:(BOOL)aDupesOnly;
- (void)updatePySelection;
- (void)performPySelection:(NSArray *)aIndexPaths;
- (void)refreshStats;

View File

@ -96,6 +96,16 @@
return r;
}
- (void)updatePySelection
{
NSArray *selection;
if (_powerMode)
selection = [py selectedPowerMarkerNodePaths];
else
selection = [py selectedResultNodePaths];
[matches selectNodePaths:selection];
}
- (void)performPySelection:(NSArray *)aIndexPaths
{
if (_powerMode)
@ -127,6 +137,7 @@
[matches setTag:0];
[self expandAll:nil];
[self outlineView:matches didClickTableColumn:nil];
[self updatePySelection];
}
- (IBAction)copyMarked:(id)sender