show icon for an entity after its last visible component was removed

This commit is contained in:
Mikulas Florek 2013-11-22 18:47:55 +01:00
parent 93fa2db9ed
commit c1b213f6c0

View file

@ -549,10 +549,10 @@ void EditorServer::removeComponent(unsigned int type_crc)
{
m_universe->getPhysicsScene()->destroyActor(cmp);
}
/* else if(type_crc == point_light_type)
else if(type_crc == point_light_type)
{
m_renderer->createPointLight(m_selected_entity);
}*/
m_renderer->destroyPointLight(cmp);
}
else
{
assert(false);
@ -958,6 +958,15 @@ void EditorServer::onEvent(Event& evt)
m_editor_icons.push_back(er);
}
}
else
{
if(e.component.entity.universe->getComponents(e.component.entity).empty())
{
EditorIcon* er = new EditorIcon();
er->create(e.component.entity, e.component);
m_editor_icons.push_back(er);
}
}
}
else if(evt.getType() == EntityMovedEvent::type)
{