Reset selection when switching player shroud in observer mode

The selection will be reset when switching from any shroud view to a
player shroud view. The selection will be kept when switching from any
view to either 'All players' or 'Shroud disabled' view.
This commit is contained in:
Oliver Brakmann
2014-09-07 00:55:23 +02:00
parent eff54a614b
commit bc50e1b0e2

View File

@@ -39,7 +39,7 @@ namespace OpenRA.Mods.RA.Widgets.Logic
Color = p.Color.RGB;
Race = p.Country.Race;
IsSelected = () => p.World.RenderPlayer == p;
OnClick = () => { p.World.RenderPlayer = p; logic.selected = this; };
OnClick = () => { p.World.RenderPlayer = p; logic.selected = this; p.World.Selection.Clear(); };
}
public CameraOption(ObserverShroudSelectorLogic logic, World w, string label, Player p)