Selecting the layer "Default" on the widgets start screen

Fixes a specflow bug which expect "Default" to be the default
selected layer. Appeared since layers are ordered alphabetically.
This commit is contained in:
Sebastien Ros
2015-09-08 09:27:36 -07:00
parent 9bac35b3f1
commit c4592aa65f

View File

@@ -69,7 +69,7 @@ namespace Orchard.Widgets.Controllers {
}
LayerPart currentLayer = layerId == null
? layers.FirstOrDefault()
? layers.FirstOrDefault(x => x.Name == "Default")
: layers.FirstOrDefault(layer => layer.Id == layerId);
if (currentLayer == null && layerId != null) { // Incorrect layer id passed