1
0
forked from 0ad/0ad

Shift-N adds that groups units to selection. Fixes #1262.

This was SVN commit r11569.
This commit is contained in:
Jonathan Waller 2012-04-19 09:00:51 +00:00
parent 496445c615
commit 82263fd3d3

View File

@ -1340,24 +1340,20 @@ function performGroup(action, groupId)
{
case "snap":
case "select":
case "add":
var toSelect = [];
g_Groups.update();
for (var ent in g_Groups.groups[groupId].ents)
toSelect.push(+ent);
g_Selection.reset();
if (action != "add")
g_Selection.reset();
g_Selection.addList(toSelect);
if (action == "snap" && toSelect.length)
Engine.CameraFollow(toSelect[0]);
break;
case "add":
var selection = g_Selection.toList();
g_Groups.addEntities(groupId, selection);
updateGroups();
break;
case "save":
var selection = g_Selection.toList();
g_Groups.groups[groupId].reset();