Mercurial > dwindows
comparison mac/dw.m @ 979:f6234f870e81
Attempt at fixing dw_window_destroy() for controls that are embedded in scrollviews on Mac.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Fri, 06 May 2011 06:34:14 +0000 |
parents | beed3e7f9d4b |
children | 94dde9b3dfc0 |
comparison
equal
deleted
inserted
replaced
978:2497a806d34e | 979:f6234f870e81 |
---|---|
7245 } | 7245 } |
7246 /* Handle destroying a control or box */ | 7246 /* Handle destroying a control or box */ |
7247 else if([object isKindOfClass:[DWBox class]] || [object isKindOfClass:[NSControl class]]) | 7247 else if([object isKindOfClass:[DWBox class]] || [object isKindOfClass:[NSControl class]]) |
7248 { | 7248 { |
7249 DWBox *parent = (DWBox *)[object superview]; | 7249 DWBox *parent = (DWBox *)[object superview]; |
7250 | |
7251 /* Some controls are embedded in scrollviews... | |
7252 * so get the parent of the scrollview in that case. | |
7253 */ | |
7254 if([parent isMemberOfClass:[NSScrollView class]]) | |
7255 { | |
7256 parent = (DWBox *)[parent superview]; | |
7257 } | |
7250 | 7258 |
7251 if([parent isKindOfClass:[DWBox class]]) | 7259 if([parent isKindOfClass:[DWBox class]]) |
7252 { | 7260 { |
7253 Box *thisbox = [parent box]; | 7261 Box *thisbox = [parent box]; |
7254 int z, index = -1; | 7262 int z, index = -1; |