Skip to content

Commit

Permalink
Properties: tweak property updates for atmosphere nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
smlpt committed Mar 15, 2024
1 parent 948217f commit 7e40049
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/main/kotlin/sc/iview/commands/edit/Properties.kt
Original file line number Diff line number Diff line change
Expand Up @@ -636,15 +636,15 @@ class Properties : InteractiveCommand() {
if (node is Atmosphere) {
node.latitude = atmosphereLatitude
node.emissionStrength = atmosphereStrength
node.hasControls = attachSunControls
if (node.hasControls) {
sciView.sceneryInputHandler?.let { node.attachRotateBehaviors(it) }
// attach/detach methods also handle the update of node.updateControls
if (attachSunControls) {
sciView.sceneryInputHandler?.let { node.attachBehaviors(it) }
} else {
sciView.sceneryInputHandler?.let { node.detachRotateBehaviors(it) }
sciView.sceneryInputHandler?.let { node.detachBehaviors(it) }
// Update the sun position immediately
node.setSunDirectionFromTime()
}
node.updateEmissionStrength()
// Update the sun position immediately
node.getSunDirectionFromTime()

}

events.publish(NodeChangedEvent(node))
Expand Down

0 comments on commit 7e40049

Please sign in to comment.