Mercurial > dwindows
comparison mac/dw.m @ 1099:d1cea9be1436
Fixed dw_window_destroy() with groupboxes on Mac.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Sat, 23 Jul 2011 05:09:34 +0000 |
parents | 9e1d6fa397be |
children | 13ea7575d9e8 |
comparison
equal
deleted
inserted
replaced
1098:9e1d6fa397be | 1099:d1cea9be1436 |
---|---|
7365 { | 7365 { |
7366 NSWindow *window = handle; | 7366 NSWindow *window = handle; |
7367 [window close]; | 7367 [window close]; |
7368 } | 7368 } |
7369 /* Handle destroying a control or box */ | 7369 /* Handle destroying a control or box */ |
7370 else if([object isKindOfClass:[DWBox class]] || [object isKindOfClass:[NSControl class]]) | 7370 else if([object isKindOfClass:[DWBox class]] || [object isKindOfClass:[DWGroupBox class]] || [object isKindOfClass:[NSControl class]]) |
7371 { | 7371 { |
7372 DWBox *parent = (DWBox *)[object superview]; | 7372 DWBox *parent = (DWBox *)[object superview]; |
7373 | 7373 |
7374 /* Some controls are embedded in scrollviews... | 7374 /* Some controls are embedded in scrollviews... |
7375 * so get the parent of the scrollview in that case. | 7375 * so get the parent of the scrollview in that case. |
7378 { | 7378 { |
7379 object = [parent superview]; | 7379 object = [parent superview]; |
7380 parent = (DWBox *)[object superview]; | 7380 parent = (DWBox *)[object superview]; |
7381 } | 7381 } |
7382 | 7382 |
7383 if([parent isKindOfClass:[DWBox class]]) | 7383 if([parent isKindOfClass:[DWBox class]] || [parent isKindOfClass:[DWGroupBox class]]) |
7384 { | 7384 { |
7385 Box *thisbox = [parent box]; | 7385 Box *thisbox = [parent box]; |
7386 int z, index = -1; | 7386 int z, index = -1; |
7387 Item *tmpitem, *thisitem = thisbox->items; | 7387 Item *tmpitem, *thisitem = thisbox->items; |
7388 | 7388 |