Modified previous fix for cell set object value fix

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_testplant_branch@38232 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Marcian Lytwyn 2014-12-04 18:46:10 +00:00
parent 1325ed9c44
commit 6a5a809f9f

View file

@ -3371,13 +3371,22 @@ byExtendingSelection: (BOOL)flag
if (validatedOK)
{
[_editedCell setStringValue: string];
id object = string;
if ([_editedCell allowsEditingTextAttributes])
{
NSTextView *textView = (NSTextView*)_textObject;
object = AUTORELEASE([[NSAttributedString alloc] initWithAttributedString:[textView textStorage]]);
}
[_editedCell setObjectValue: object];
if (_dataSource_editable)
{
NSTableColumn *tb = [_tableColumns objectAtIndex: _editedColumn];
// Need to pass string or attributedString based on cell settings...
NSTableColumn *tb = [_tableColumns objectAtIndex: _editedColumn];
[self _setObjectValue: [_textObject textStorage] // newObjectValue
[self _setObjectValue: object // newObjectValue
forTableColumn: tb
row: _editedRow];
}