From dc34b4ddbe620cd0e77cf8dd26cebc990b47c7ea Mon Sep 17 00:00:00 2001 From: gcasa Date: Mon, 1 Sep 2014 05:33:35 +0000 Subject: [PATCH] Fix issue with saving text contents of a cell. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@38053 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 6 ++++++ Source/NSCell.m | 14 +------------- 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index 35dec68a4..05392f7a5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2014-09-01 01:30-EDT Gregory John Casamento + + * Source/NSCell.m: Fix issue with saving text contents of the cell. + The code was improperly replacing the contents with the image + depending on cell type. + 2014-08-20 22:49-EDT Gregory John Casamento * Headers/AppKit/NSButtonCell.h diff --git a/Source/NSCell.m b/Source/NSCell.m index ec17532c1..a58b28d60 100644 --- a/Source/NSCell.m +++ b/Source/NSCell.m @@ -2410,21 +2410,9 @@ static NSColor *dtxtCol; { unsigned long cFlags = 0; unsigned int cFlags2 = 0; - id contents; + id contents = _contents; // encode contents - if (_cell.type == NSTextCellType) - { - contents = _contents; - } - else if (_cell.type == NSImageCellType) - { - contents = _cell_image; - } - else - { - contents = [self objectValue]; - } [aCoder encodeObject: contents forKey: @"NSContents"]; // flags