mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-26 18:35:20 +00:00
Don't use multiple parental node paths.
This commit is contained in:
parent
22e717161a
commit
1c24cba46a
@ -167,7 +167,6 @@ CSVRender::Object::Object (CSMWorld::Data& data, osg::Group* parentNode,
|
|||||||
mBaseNode->addCullCallback(new SceneUtil::LightListCallback);
|
mBaseNode->addCullCallback(new SceneUtil::LightListCallback);
|
||||||
|
|
||||||
mOutline = new osgFX::Scribe;
|
mOutline = new osgFX::Scribe;
|
||||||
mOutline->addChild(mBaseNode);
|
|
||||||
|
|
||||||
mBaseNode->setUserData(new ObjectTag(this));
|
mBaseNode->setUserData(new ObjectTag(this));
|
||||||
|
|
||||||
@ -202,10 +201,14 @@ void CSVRender::Object::setSelected(bool selected)
|
|||||||
{
|
{
|
||||||
mSelected = selected;
|
mSelected = selected;
|
||||||
|
|
||||||
|
mOutline->removeChild(mBaseNode);
|
||||||
mRootNode->removeChild(mOutline);
|
mRootNode->removeChild(mOutline);
|
||||||
mRootNode->removeChild(mBaseNode);
|
mRootNode->removeChild(mBaseNode);
|
||||||
if (selected)
|
if (selected)
|
||||||
|
{
|
||||||
|
mOutline->addChild(mBaseNode);
|
||||||
mRootNode->addChild(mOutline);
|
mRootNode->addChild(mOutline);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
mRootNode->addChild(mBaseNode);
|
mRootNode->addChild(mBaseNode);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user