changeset 980:94dde9b3dfc0

Ok so we need to set the object to be the right value in this case so it gets removed from the proper view on Mac.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Fri, 06 May 2011 06:47:31 +0000
parents f6234f870e81
children 536ec60ee433
files mac/dw.m
diffstat 1 files changed, 4 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/mac/dw.m	Fri May 06 06:34:14 2011 +0000
+++ b/mac/dw.m	Fri May 06 06:47:31 2011 +0000
@@ -7251,9 +7251,10 @@
         /* Some controls are embedded in scrollviews... 
          * so get the parent of the scrollview in that case.
          */
-        if([parent isMemberOfClass:[NSScrollView class]])
-        {
-            parent = (DWBox *)[parent superview];
+        if([object isKindOfClass:[NSTableView class]] && [parent isMemberOfClass:[NSScrollView class]])
+        {
+            object = parent;
+            parent = (DWBox *)[object superview];
         }
 
         if([parent isKindOfClass:[DWBox class]])
@@ -7263,9 +7264,6 @@
             Item *tmpitem, *thisitem = thisbox->items;
 
             [object removeFromSuperview];
-            /* Do we need to release?
-             * [object release];
-             */
 
             for(z=0;z<thisbox->count;z++)
             {