Skip to content

Commit

Permalink
Reset view when reselecting current camera
Browse files Browse the repository at this point in the history
  • Loading branch information
nicklockwood committed Apr 28, 2022
1 parent f729f75 commit 92fe53f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Viewer/Document.swift
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,12 @@ class Document: NSDocument, EvaluationDelegate {
NSSound.beep()
return
}
camera = cameras[menuItem.tag]
let camera = cameras[menuItem.tag]
if camera == self.camera {
sceneViewControllers.forEach { $0.resetCamera(nil) }
} else {
self.camera = camera
}
}

@IBAction func showWireframe(_: NSMenuItem) {
Expand Down

0 comments on commit 92fe53f

Please sign in to comment.