changeset 1215:dc8ea09605f7

Can't set the background on Image cells apparently on Mac... Filter them out for now... may need to switch to using DWImageAndTextCell for those too.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Sun, 09 Oct 2011 10:32:44 +0000
parents e16e7c51b6c7
children f87e5a44f45e
files mac/dw.m
diffstat 1 files changed, 21 insertions(+), 18 deletions(-) [+]
line wrap: on
line diff
--- a/mac/dw.m	Sun Oct 09 10:24:21 2011 +0000
+++ b/mac/dw.m	Sun Oct 09 10:32:44 2011 +0000
@@ -1593,26 +1593,29 @@
         NSImage *img = [browsercell image];
         [bcell setImage:img];
     }
-    /* Handle drawing alternating row colors if enabled */
-    if ((row % 2) == 0)
-    {
-        if(evencolor)
-        {
-            [bcell setDrawsBackground:YES];
-            [bcell setBackgroundColor:evencolor];
+    if([cell isKindOfClass:[NSTextFieldCell class]])
+    {
+        /* Handle drawing alternating row colors if enabled */
+        if ((row % 2) == 0)
+        {
+            if(evencolor)
+            {
+                [bcell setDrawsBackground:YES];
+                [bcell setBackgroundColor:evencolor];
+            }
+            else
+                [bcell setDrawsBackground:NO];
         }
         else
-            [bcell setDrawsBackground:NO];
-    }
-    else
-    {
-        if(oddcolor)
-        {
-            [bcell setDrawsBackground:YES];
-            [bcell setBackgroundColor:oddcolor];
-        }
-        else
-            [bcell setDrawsBackground:NO];
+        {
+            if(oddcolor)
+            {
+                [bcell setDrawsBackground:YES];
+                [bcell setBackgroundColor:oddcolor];
+            }
+            else
+                [bcell setDrawsBackground:NO];
+        }
     }
 }
 -(void)editCell:(id)input at:(int)row and:(int)col