- Updated help menu web links (removed map-center.com, added ETB documentation) (Shaderman)

- Added check for existing worldspawn if a new one should be added with the entity menu (Shaderman)
- Fixed Entity -> Ungroup (Topsun)
- Fixed hotkey collision ALT+M (filter botclip/Modify menu). New Modify shortcut = ALT+O (Shaderman)
- Updated Window Layout images (Shaderman)
- Fixed (TODO) XYWindow: save show-workzone option (Shaderman)
- Fixed (TODO) Toolbar: add shortcut to tooltips for toolbar buttons (Shaderman)
- Fixed (TODO) GUI: detachable submenus (Shaderman)


git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@117 8a3a26a2-13c4-0310-b231-cf6edde360e5
This commit is contained in:
namespace
2006-10-12 19:10:05 +00:00
parent bd1602cf73
commit bc832533c3
11 changed files with 108 additions and 46 deletions

View File

@@ -130,35 +130,29 @@ void Scene_EntitySetClassname_Selected(const char* classname)
}
class EntityUngroupVisitor : public SelectionSystem::Visitor
{
const scene::Path& m_parent;
public:
EntityUngroupVisitor(const scene::Path& parent) : m_parent(parent)
{
}
void visit(scene::Instance& instance) const
{
if(Node_getEntity(instance.path().top()) != 0
&& node_is_group(instance.path().top()))
{
if(m_parent.top().get_pointer() != instance.path().top().get_pointer())
{
parentBrushes(instance.path().top(), m_parent.top());
Path_deleteTop(instance.path());
}
}
}
};
void Entity_ungroupSelected()
{
if (GlobalSelectionSystem().countSelected() < 1) return;
UndoableCommand undo("ungroupSelectedEntities");
scene::Path world_path(makeReference(GlobalSceneGraph().root()));
world_path.push(makeReference(Map_FindOrInsertWorldspawn(g_map)));
GlobalSelectionSystem().foreachSelected(EntityUngroupVisitor(world_path));
scene::Instance &instance = GlobalSelectionSystem().ultimateSelected();
scene::Path path = instance.path();
if (!Node_isEntity(path.top())) path.pop();
if(Node_getEntity(path.top()) != 0
&& node_is_group(path.top()))
{
if(world_path.top().get_pointer() != path.top().get_pointer())
{
parentBrushes(path.top(), world_path.top());
Path_deleteTop(path);
}
}
}