Didn't test the AncestorOrSelf changes on a non-parent node. Changed implementation to call into Func<DynamicNode,bool> to check Level == 1
Also fixed post-build rule on umbraco.MacroEngines which had an incorrect path for copying umbraco.MacroEngines to presentation (allows debug without manual file copy, I think)
This commit is contained in:
@@ -249,28 +249,7 @@ namespace umbraco.MacroEngines
|
||||
}
|
||||
public DynamicNode AncestorOrSelf()
|
||||
{
|
||||
var node = this;
|
||||
while (node != null)
|
||||
{
|
||||
DynamicNode parent = node.Parent;
|
||||
if (parent != null)
|
||||
{
|
||||
if (this != parent)
|
||||
{
|
||||
node = parent;
|
||||
}
|
||||
else
|
||||
{
|
||||
return node;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return node;
|
||||
}
|
||||
}
|
||||
|
||||
return node;
|
||||
return AncestorOrSelf(node => node.Level == 1);
|
||||
}
|
||||
public DynamicNode AncestorOrSelf(Func<DynamicNode, bool> func)
|
||||
{
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>xcopy "$(ProjectDir)bin\debug\umbraco.MacroEngines.*" "$(ProjectDir)..\presentation\bin\" /Y/F</PostBuildEvent>
|
||||
<PostBuildEvent>xcopy "$(ProjectDir)bin\debug\umbraco.MacroEngines.*" "$(ProjectDir)..\umbraco\presentation\bin\" /Y/F</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
|
||||
Reference in New Issue
Block a user