Hello,

here is a bug fix for unarchiving gmodels. It selects selected cells in the  
matrix too.


2000-05-24 Georg Fleischmann

        * gui/Model/GMAppKit.m
        ([NSScrollView(GMArchiverMethods) -initWithModelUnarchiver:]):
        select selected cells in matrix too


*** gui/Model/GMAppKit.m.old    Mon May 22 18:22:27 2000
--- gui/Model/GMAppKit.m        Wed May 24 18:08:05 2000
***************
*** 434,441 ****
      nc = [unarchiver decodeIntWithName:@"numberOfColumns"];
      cell_array = [unarchiver decodeObjectWithName:@"cells"];
      [self renewRows:nr columns:nc];
!     for (i = 0; (i < [cell_array count]) && (i < nr*nc); i++) {
!         [self putCell:[cell_array objectAtIndex:i] atRow:i/nc column:i%nc];
      }

      decodedDelegate = [unarchiver decodeObjectWithName:@"delegate"];
--- 434,446 ----
      nc = [unarchiver decodeIntWithName:@"numberOfColumns"];
      cell_array = [unarchiver decodeObjectWithName:@"cells"];
      [self renewRows:nr columns:nc];
!     for (i = 0; (i < [cell_array count]) && (i < nr*nc); i++)
!     {
!         id    cell = [cell_array objectAtIndex:i];
!
!         [self putCell:cell atRow:i/nc column:i%nc];
!         if ([cell state])
!             [self selectCellAtRow:i/nc column:i%nc];
      }

      decodedDelegate = [unarchiver decodeObjectWithName:@"delegate"];


---
Georg Fleischmann

vhf interservice
http://www.vhf.de

Reply via email to