Fixing that driver editor posts are executed if grouping was set from placement but the shape hidden

This commit is contained in:
Lombiq
2015-05-18 17:11:21 +02:00
committed by Zoltán Lehóczky
parent f2b8d68345
commit 052a80474f
@@ -72,13 +72,18 @@ namespace Orchard.ContentManagement.Drivers {
Path = context.Path
};
var location = descriptor.Placement(placementContext).Location;
var placementInfo = descriptor.Placement(placementContext);
var location = placementInfo.Location;
if (String.IsNullOrEmpty(location) || location == "-") {
return editor;
}
var editorGroup = editor.GetGroup() ?? "";
var editorGroup = editor.GetGroup();
if (string.IsNullOrEmpty(editorGroup)) {
editorGroup = placementInfo.GetGroup() ?? "";
}
var contextGroup = context.GroupId ?? "";
if (!String.Equals(editorGroup, contextGroup, StringComparison.OrdinalIgnoreCase)) {