mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-07 01:18:02 +00:00
Fixed: implicitly set selectionIndexes.
`CPTableView`'s `selectionIndexes` binding shouldn't be set automatically unless the content binding was also set automatically (through a table column binding). Assume that manual content binding implies a desire to manually bind selection indexes (and sort descriptors) as well.
This commit is contained in:
1 parent
a70bc7d953
commit
da91ab9879
1 file changed
+7
-3
@@ -4794,10 +4794,14 @@ Your delegate can implement this method to avoid subclassing the tableview to ad
|
||||
_contentBindingExpicitelySet = NO;
|
||||
}
|
||||
|
||||
if ([[self infoForBinding:@"selectionIndexes"] objectForKey:CPObservedObjectKey] !== destination)
|
||||
[self bind:@"selectionIndexes" toObject:destination withKeyPath:@"selectionIndexes" options:nil];
|
||||
// If the content binding was set manually assume the user is taking manual control of establishing bindings.
|
||||
if (!_contentBindingExpicitelySet)
|
||||
{
|
||||
if ([[self infoForBinding:@"selectionIndexes"] objectForKey:CPObservedObjectKey] !== destination)
|
||||
[self bind:@"selectionIndexes" toObject:destination withKeyPath:@"selectionIndexes" options:nil];
|
||||
|
||||
//[self bind:@"sortDescriptors" toObject:destination withKeyPath:@"sortDescriptors" options:nil];
|
||||
//[self bind:@"sortDescriptors" toObject:destination withKeyPath:@"sortDescriptors" options:nil];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)bind:(CPString)aBinding toObject:(id)anObject withKeyPath:(CPString)aKeyPath options:(CPDictionary)options
|
||||
|
||||
Reference in new issue
Block a user