Always create new ContentViewController for volume
This is needed to re-parent the VolumeSlider window, as there is only a single VolumeSlider, but two different VolumeButtons and their respective NSPopover windows. So, always recreate the view on open, which doesn't appear to have a noticeable impact on performance. Fixes #331 Signed-off-by: Christopher Snowhill <kode54@gmail.com>xcode15
parent
bc66220b36
commit
0d7fd92c82
|
@ -38,11 +38,10 @@
|
|||
- (void)mouseDown:(NSEvent *)theEvent {
|
||||
[popover close];
|
||||
|
||||
if(!viewController) {
|
||||
viewController = [[NSViewController alloc] init];
|
||||
viewController.view = _popView;
|
||||
popover.contentViewController = viewController;
|
||||
}
|
||||
popover.contentViewController = nil;
|
||||
viewController = [[NSViewController alloc] init];
|
||||
viewController.view = _popView;
|
||||
popover.contentViewController = viewController;
|
||||
|
||||
[popover showRelativeToRect:self.bounds ofView:self preferredEdge:NSRectEdgeMaxY];
|
||||
|
||||
|
|
Loading…
Reference in New Issue