mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-06 17:12:50 +00:00
Fixed: if orderOut: was not called for a popover, it would not detach from its parent
When a transient popover was closed by clicking, in some cases it would not detach from its parent, leaving it in the window list. This caused problems later on. This commit ensures the popover is detached from its parent when it is ordered out.
This commit is contained in:
1 parent
3696986a5c
commit
facd97c09d
2 files changed
+2
-1
No files matched your search
@@ -543,6 +543,7 @@ var _CPPopoverWindow_shouldClose_ = 1 << 0,
|
||||
#endif
|
||||
|
||||
[_targetView removeObserver:self forKeyPath:@"frame"];
|
||||
[_parentWindow removeChildWindow:self];
|
||||
[super _orderOutRecursively:recursive];
|
||||
|
||||
_shouldPerformAnimation = YES;
|
||||
|
||||
@@ -475,8 +475,8 @@
|
||||
[viewController setView:[[self window] contentView]];
|
||||
[aPopover setContentSize:[[[self window] contentView] boundsSize]];
|
||||
[aPopover setAnimates:YES];
|
||||
[aPopover showRelativeToRect:[sender bounds] ofView:sender preferredEdge:CPMaxXEdge];
|
||||
[aPopover setBehavior:CPPopoverBehaviorTransient];
|
||||
[aPopover showRelativeToRect:[sender bounds] ofView:sender preferredEdge:CPMaxXEdge];
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
Reference in new issue
Block a user