Author: mlytwyn
Date: Thu Dec 4 19:46:10 2014
New Revision: 38232
URL: http://svn.gna.org/viewcvs/gnustep?rev=38232&view=rev
Log:
Modified previous fix for cell set object value fix
Modified:
libs/gui/branches/gnustep_testplant_branch/Source/NSTableView.m
Modified: libs/gui/branches/gnustep_testplant_branch/Source/NSTableView.m
URL:
http://svn.gna.org/viewcvs/gnustep/libs/gui/branches/gnustep_testplant_branch/Source/NSTableView.m?rev=38232&r1=38231&r2=38232&view=diff
==============================================================================
--- libs/gui/branches/gnustep_testplant_branch/Source/NSTableView.m
(original)
+++ libs/gui/branches/gnustep_testplant_branch/Source/NSTableView.m Thu Dec
4 19:46:10 2014
@@ -3371,13 +3371,22 @@
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];
}
_______________________________________________
Gnustep-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/gnustep-cvs