# HG changeset patch # User bsmith@81767d24-ef19-dc11-ae90-00e081727c95 # Date 1602736758 0 # Node ID a5d58393f7d09b11738bdb624ee768bd95a1ba34 # Parent a02ff89279278fb56ccb9ae5c6d94339d1e14e18 Mac: Missed updating dw_filesystem_set_file() in that last commit. diff -r a02ff8927927 -r a5d58393f7d0 mac/dw.m --- a/mac/dw.m Thu Oct 15 03:38:23 2020 +0000 +++ b/mac/dw.m Thu Oct 15 04:39:18 2020 +0000 @@ -7677,9 +7677,7 @@ /* If pointer is NULL we are getting a change request instead of set */ if(pointer) - { lastadd = [cont lastAddPoint]; - } if(data) { @@ -7737,7 +7735,7 @@ /* If it is a cell, change the content of the cell */ if([object isMemberOfClass:[NSTableCellView class]]) { - NSTableCellView *cell = [cont getRow:(row+lastadd) and:column]; + NSTableCellView *cell = object; if(icon) [[cell imageView] setImage:icon]; else @@ -7808,27 +7806,34 @@ { DW_FUNCTION_INIT; DWContainer *cont = handle; -#ifdef DW_USE_NSVIEW - NSTableCellView *browsercell; -#else - DWImageAndTextCell *browsercell; -#endif + NSString *text = filename ? [NSString stringWithUTF8String:filename] : nil; int lastadd = 0; /* If pointer is NULL we are getting a change request instead of set */ if(pointer) - { lastadd = [cont lastAddPoint]; - } #ifdef DW_USE_NSVIEW - browsercell = _dw_table_cell_view_new(icon, [NSString stringWithUTF8String:filename]); + id object = [cont getRow:(row+lastadd) and:0]; + + /* If it is a cell, change the content of the cell */ + if([object isMemberOfClass:[NSTableCellView class]]) + { + NSTableCellView *cell = object; + + if(icon) + [[cell imageView] setImage:icon]; + if(text) + [[cell textField] setStringValue:text]; + } + else /* Otherwise replace it with a new cell */ + [cont editCell:_dw_table_cell_view_new(icon, text) at:(row+lastadd) and:0]; #else - browsercell = [[[DWImageAndTextCell alloc] init] autorelease]; + DWImageAndTextCell *browsercell = [[[DWImageAndTextCell alloc] init] autorelease]; [browsercell setImage:icon]; - [browsercell setStringValue:[ NSString stringWithUTF8String:filename ]]; -#endif + [browsercell setStringValue:[NSString stringWithUTF8String:filename]]; [cont editCell:browsercell at:(row+lastadd) and:0]; +#endif [cont setNeedsDisplay:YES]; DW_FUNCTION_RETURN_NOTHING; }