forked from mirror/openmw-tes3mp
Don't use multiple parent node paths in CSVRender::Object
This commit is contained in:
parent
1667c807be
commit
a6621626aa
1 changed files with 4 additions and 1 deletions
|
@ -160,7 +160,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));
|
||||||
|
|
||||||
|
@ -194,10 +193,14 @@ void CSVRender::Object::setSelected(bool selected)
|
||||||
{
|
{
|
||||||
mSelected = selected;
|
mSelected = selected;
|
||||||
|
|
||||||
|
mOutline->removeChild(mBaseNode);
|
||||||
mParentNode->removeChild(mOutline);
|
mParentNode->removeChild(mOutline);
|
||||||
mParentNode->removeChild(mBaseNode);
|
mParentNode->removeChild(mBaseNode);
|
||||||
if (selected)
|
if (selected)
|
||||||
|
{
|
||||||
|
mOutline->addChild(mBaseNode);
|
||||||
mParentNode->addChild(mOutline);
|
mParentNode->addChild(mOutline);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
mParentNode->addChild(mBaseNode);
|
mParentNode->addChild(mBaseNode);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue