fix cloning (don't clone the worldspam)
This commit is contained in:
parent
4d1e944aca
commit
5f44865ec2
|
|
@ -1196,6 +1196,11 @@ public:
|
||||||
if(path.size() == 1)
|
if(path.size() == 1)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
// ignore worldspawn, but keep checking children
|
||||||
|
NodeSmartReference me(path.top().get());
|
||||||
|
if(me == Map_FindOrInsertWorldspawn(g_map))
|
||||||
|
return true;
|
||||||
|
|
||||||
if(!path.top().get().isRoot())
|
if(!path.top().get().isRoot())
|
||||||
{
|
{
|
||||||
Selectable* selectable = Instance_getSelectable(instance);
|
Selectable* selectable = Instance_getSelectable(instance);
|
||||||
|
|
@ -1213,6 +1218,11 @@ public:
|
||||||
if(path.size() == 1)
|
if(path.size() == 1)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
// ignore worldspawn, but keep checking children
|
||||||
|
NodeSmartReference me(path.top().get());
|
||||||
|
if(me == Map_FindOrInsertWorldspawn(g_map))
|
||||||
|
return;
|
||||||
|
|
||||||
if(!path.top().get().isRoot())
|
if(!path.top().get().isRoot())
|
||||||
{
|
{
|
||||||
Selectable* selectable = Instance_getSelectable(instance);
|
Selectable* selectable = Instance_getSelectable(instance);
|
||||||
|
|
|
||||||
|
|
@ -347,12 +347,18 @@ public:
|
||||||
bool pre(const scene::Path& path, scene::Instance& instance) const
|
bool pre(const scene::Path& path, scene::Instance& instance) const
|
||||||
{
|
{
|
||||||
++m_depth;
|
++m_depth;
|
||||||
|
|
||||||
|
// ignore worldspawn
|
||||||
|
NodeSmartReference me(path.top().get());
|
||||||
|
if(me == Map_FindOrInsertWorldspawn(g_map))
|
||||||
|
return false;
|
||||||
|
|
||||||
if(m_depth == 2) // entity depth
|
if(m_depth == 2) // entity depth
|
||||||
{
|
{
|
||||||
// traverse and select children if any one is selected
|
// traverse and select children if any one is selected
|
||||||
if(instance.childSelected())
|
if(instance.childSelected())
|
||||||
Instance_setSelected(instance, true);
|
Instance_setSelected(instance, true);
|
||||||
return Node_getEntity(path.top())->isContainer() && instance.childSelected();
|
return Node_getEntity(path.top())->isContainer() && instance.isSelected();
|
||||||
}
|
}
|
||||||
else if(m_depth == 3) // primitive depth
|
else if(m_depth == 3) // primitive depth
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user