mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 05:10:47 +00:00
* Source/NSTableView.m (-_isCellEditableColumn:row:): Tweak
criteria for determining cell editability:: - the delegate (if present) must say YES - and the cell itself must return YES for isEditable - and the table column must return YES for isEditable Previously you could edit cells that returned NO for isEditable if the column they were in was editable. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34320 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
0c1a040bda
commit
d8ed82a8a8
2 changed files with 18 additions and 10 deletions
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
||||||
|
2011-12-18 Eric Wasylishen <ewasylishen@gmail.com>
|
||||||
|
|
||||||
|
* Source/NSTableView.m (-_isCellEditableColumn:row:): Tweak
|
||||||
|
criteria for determining cell editability::
|
||||||
|
- the delegate (if present) must say YES
|
||||||
|
- and the cell itself must return YES for isEditable
|
||||||
|
- and the table column must return YES for isEditable
|
||||||
|
Previously you could edit cells that returned NO for
|
||||||
|
isEditable if the column they were in was editable.
|
||||||
|
|
||||||
2011-12-18 Eric Wasylishen <ewasylishen@gmail.com>
|
2011-12-18 Eric Wasylishen <ewasylishen@gmail.com>
|
||||||
|
|
||||||
* Source/NSTableHeaderView.m (-initWithCoder:): Remove unneeded
|
* Source/NSTableHeaderView.m (-initWithCoder:): Remove unneeded
|
||||||
|
|
|
@ -6530,17 +6530,15 @@ For a more detailed explanation, -setSortDescriptors:. */
|
||||||
row: (int) rowIndex
|
row: (int) rowIndex
|
||||||
|
|
||||||
{
|
{
|
||||||
NSTableColumn *tableColumn;
|
NSTableColumn *tableColumn = [_tableColumns objectAtIndex: columnIndex];
|
||||||
|
NSCell *cell = [tableColumn dataCellForRow: rowIndex];
|
||||||
|
|
||||||
|
BOOL cellIsEditable = [cell isEditable];
|
||||||
|
BOOL columnIsEditable = [tableColumn isEditable];
|
||||||
|
BOOL delegateAllowsEditing = [self _shouldEditTableColumn: tableColumn
|
||||||
|
row: rowIndex];
|
||||||
|
|
||||||
tableColumn = [_tableColumns objectAtIndex: columnIndex];
|
return cellIsEditable && columnIsEditable && delegateAllowsEditing;
|
||||||
// If the column is editable, the cell always is
|
|
||||||
if ([tableColumn isEditable])
|
|
||||||
{
|
|
||||||
// otherwise ask the delegate, if any.
|
|
||||||
return [self _shouldEditTableColumn: tableColumn row: rowIndex];
|
|
||||||
}
|
|
||||||
|
|
||||||
return NO;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) _willDisplayCell: (NSCell*)cell
|
- (void) _willDisplayCell: (NSCell*)cell
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue