[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 {
|
- (void)mouseDown:(NSEvent *)theEvent {
|
||||||
[popover close];
|
[popover close];
|
||||||
|
|
||||||
viewController = [[NSViewController alloc] init];
|
if(!viewController) {
|
||||||
viewController.view = _popView;
|
viewController = [[NSViewController alloc] init];
|
||||||
popover.contentViewController = viewController;
|
viewController.view = _popView;
|
||||||
|
popover.contentViewController = viewController;
|
||||||
|
}
|
||||||
|
|
||||||
[popover showRelativeToRect:self.bounds ofView:self preferredEdge:NSRectEdgeMaxY];
|
[popover showRelativeToRect:self.bounds ofView:self preferredEdge:NSRectEdgeMaxY];
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue