From ae9c05a8e3ac67e54bc4555edbfbbaca5a2101d3 Mon Sep 17 00:00:00 2001 From: Philippe Renon Date: Tue, 29 Mar 2016 09:16:23 +0200 Subject: [PATCH] LP-29 minor OSGSkyNode renaming --- .../src/libs/osgearth/osgQtQuick/OSGSkyNode.cpp | 16 ++++++++-------- .../src/libs/osgearth/osgQtQuick/OSGSkyNode.hpp | 1 + 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/ground/gcs/src/libs/osgearth/osgQtQuick/OSGSkyNode.cpp b/ground/gcs/src/libs/osgearth/osgQtQuick/OSGSkyNode.cpp index 0754ed17a..07d960871 100644 --- a/ground/gcs/src/libs/osgearth/osgQtQuick/OSGSkyNode.cpp +++ b/ground/gcs/src/libs/osgearth/osgQtQuick/OSGSkyNode.cpp @@ -88,22 +88,22 @@ public: return true; } - void updateSkyNode() + void updateScene() { if (!sceneNode || !sceneNode->node()) { - qWarning() << "OSGSkyNode::updateSkyNode - scene node not valid"; + qWarning() << "OSGSkyNode::updateScene - scene node not valid"; self->setNode(NULL); return; } - qDebug() << "OSGSkyNode::updateSkyNode - scene node" << sceneNode->node(); + qDebug() << "OSGSkyNode::updateScene - scene node" << sceneNode->node(); osgEarth::MapNode *mapNode = osgEarth::MapNode::findMapNode(sceneNode->node()); if (!mapNode) { - qWarning() << "OSGSkyNode::updateSkyNode - scene node does not contain a map node"; + qWarning() << "OSGSkyNode::updateScene - scene node does not contain a map node"; self->setNode(NULL); return; } if (!mapNode->getMap()->isGeocentric()) { - qWarning() << "OSGSkyNode::updateSkyNode - map node is not geocentric"; + qWarning() << "OSGSkyNode::updateScene - map node is not geocentric"; self->setNode(NULL); return; } @@ -124,7 +124,7 @@ public: } else { skyNode->removeChild(0, 1); skyNode->addChild(sceneNode->node()); - self->emitNodeChanged(); + // self->emitNodeChanged(); } } @@ -217,7 +217,7 @@ private slots: void onSceneNodeChanged(osg::Node *node) { qDebug() << "OSGSkyNode::onSceneNodeChanged" << node; - updateSkyNode(); + updateScene(); } }; @@ -313,7 +313,7 @@ void OSGSkyNode::updateNode() Inherited::updateNode(); if (isDirty(Scene)) { - h->updateSkyNode(); + h->updateScene(); } if (isDirty(Viewport)) { h->updateViewport(); diff --git a/ground/gcs/src/libs/osgearth/osgQtQuick/OSGSkyNode.hpp b/ground/gcs/src/libs/osgearth/osgQtQuick/OSGSkyNode.hpp index 3728b9dbc..569c0c864 100644 --- a/ground/gcs/src/libs/osgearth/osgQtQuick/OSGSkyNode.hpp +++ b/ground/gcs/src/libs/osgearth/osgQtQuick/OSGSkyNode.hpp @@ -45,6 +45,7 @@ QT_END_NAMESPACE namespace osgQtQuick { class OSGViewport; +// TODO should derive from OSGGroup class OSGQTQUICK_EXPORT OSGSkyNode : public OSGNode { Q_OBJECT Q_PROPERTY(osgQtQuick::OSGNode *sceneNode READ sceneNode WRITE setSceneNode NOTIFY sceneNodeChanged) Q_PROPERTY(osgQtQuick::OSGViewport * viewport READ viewport WRITE setViewport NOTIFY viewportChanged)