Skip to content

Commit

Permalink
Strip __ from FindPlacementImpl when searching shape table descriptor…
Browse files Browse the repository at this point in the history
…s to support TextField_Edit__Options shape type (#4484)
  • Loading branch information
deanmarcussen authored and sebastienros committed Oct 10, 2019
1 parent 6ad22b3 commit 2d49b61
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,14 @@ protected async Task BindPlacementAsync(IBuildShapeContext context)

private static PlacementInfo FindPlacementImpl(ShapeTable shapeTable, string shapeType, string differentiator, string displayType, IBuildShapeContext context)
{
ShapeDescriptor descriptor;
var delimiterIndex = shapeType.IndexOf("__");

if (shapeTable.Descriptors.TryGetValue(shapeType, out descriptor))
if (delimiterIndex > 0)
{
shapeType = shapeType.Substring(0, delimiterIndex);
}

if (shapeTable.Descriptors.TryGetValue(shapeType, out var descriptor))
{
var placementContext = new ShapePlacementContext(
shapeType,
Expand Down

0 comments on commit 2d49b61

Please sign in to comment.