[Volume Control] Only initialize view once
Only initialize viewController once, the first time the volume control is opened. Re-initializing it can cause an error assigning it as first responder to the volume slider popover view. Signed-off-by: Christopher Snowhill <kode54@gmail.com>swiftingly
parent
aa36e3ce10
commit
bb95270747
|
@ -38,9 +38,11 @@
|
|||
- (void)mouseDown:(NSEvent *)theEvent {
|
||||
[popover close];
|
||||
|
||||
viewController = [[NSViewController alloc] init];
|
||||
viewController.view = _popView;
|
||||
popover.contentViewController = viewController;
|
||||
if(!viewController) {
|
||||
viewController = [[NSViewController alloc] init];
|
||||
viewController.view = _popView;
|
||||
popover.contentViewController = viewController;
|
||||
}
|
||||
|
||||
[popover showRelativeToRect:self.bounds ofView:self preferredEdge:NSRectEdgeMaxY];
|
||||
|
||||
|
|
Loading…
Reference in New Issue