]> git.mxchange.org Git - simgear.git/commitdiff
Make some properties read-only to avoid sim-reset issues.
authorThorstenB <brehmt@gmail.com>
Sun, 12 Jun 2011 11:31:23 +0000 (13:31 +0200)
committerThorstenB <brehmt@gmail.com>
Sun, 12 Jun 2011 11:31:23 +0000 (13:31 +0200)
Do not loose internal statistics/state on sim-reset

simgear/scene/tsync/terrasync.cxx

index 88710f4d8b78f1fa7d007aed87eb9b206e9c35cf..e2d288601f25180df34bb97c3234699f52b204cc 100644 (file)
@@ -619,7 +619,11 @@ void SGTerraSync::bind()
     _tiedProperties.Tie( _terraRoot->getNode("update-count", true), (int*) &_svnThread->_success_count );
     _tiedProperties.Tie( _terraRoot->getNode("error-count", true), (int*) &_svnThread->_fail_count );
     _tiedProperties.Tie( _terraRoot->getNode("tile-count", true), (int*) &_svnThread->_updated_tile_count );
-
+    _terraRoot->getNode("busy", true)->setAttribute(SGPropertyNode::WRITE,false);
+    _terraRoot->getNode("active", true)->setAttribute(SGPropertyNode::WRITE,false);
+    _terraRoot->getNode("update-count", true)->setAttribute(SGPropertyNode::WRITE,false);
+    _terraRoot->getNode("error-count", true)->setAttribute(SGPropertyNode::WRITE,false);
+    _terraRoot->getNode("tile-count", true)->setAttribute(SGPropertyNode::WRITE,false);
     // stalled is used as a signal handler (to connect listeners triggering GUI pop-ups)
     _stalled_node = _terraRoot->getNode("stalled", true);
     _stalled_node->setBoolValue(_svnThread->_stalled);