From 84eadd1f33004f95fc61957f472894ac2d021381 Mon Sep 17 00:00:00 2001 From: Christopher Snowhill Date: Sun, 22 May 2022 17:45:51 -0700 Subject: [PATCH] [Visualization] Use forced 3D mode in window Windowed style should always use the perspective camera mode. Signed-off-by: Christopher Snowhill --- Visualization/SpectrumView.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Visualization/SpectrumView.m b/Visualization/SpectrumView.m index 718e780df..11f4478bd 100644 --- a/Visualization/SpectrumView.m +++ b/Visualization/SpectrumView.m @@ -75,7 +75,7 @@ extern NSString *CogPlaybackDidStopNotficiation; } - (void)updateControls { - BOOL projectionMode = [[NSUserDefaults standardUserDefaults] boolForKey:@"spectrumProjectionMode"]; + BOOL projectionMode = cameraControlEnabled ? NO : [[NSUserDefaults standardUserDefaults] boolForKey:@"spectrumProjectionMode"]; SCNNode *rootNode = [[self scene] rootNode]; SCNNode *cameraNode = [rootNode childNodeWithName:@"camera" recursively:NO]; SCNCamera *camera = [cameraNode camera]; @@ -118,6 +118,7 @@ extern NSString *CogPlaybackDidStopNotficiation; - (void)enableCameraControl { [self setAllowsCameraControl:YES]; cameraControlEnabled = YES; + [self updateControls]; } - (void)setup {