qgis/Quantum-GIS — pull request #95 by tecoholic (2012-02-14 14:27:13+00:00)
Title: Adds an extra Right click menu item in legend

An extra menu item is added called "Group Selected" in the legend. This menu item is shown when multiple layers are selected in the legend tree.

* When clicked, it creates a new group and puts all the selected layers into it.
* When all the selected items are inside the same group, a subgroup will be created for the selected layers.
* When layers from various groups and top level are selected, the __last selected__ item's parent is used as the new group's parent. This is because there is *no* logical way to determine, what the user actually intends to do.
* When groups themselves are selected along with the layers, again logically its difficult to determine what user intends and hence groups are generally skipped. So creating a group of groups is not possible.

__Use case:__
This improves usability when multiple layers are to be grouped. Instead of creating a new group and dragging the layers (sometimes one by one), a user can simply control-click the required layers and select "Group Selected"