1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Fixed a bug in Grid where the area calculation could terminate early

This commit is contained in:
ed 2018-06-11 10:38:14 +01:00
parent a1b6f2aa34
commit 4af9526ab5

View file

@ -298,7 +298,12 @@ struct Grid::PlacementHelpers
const std::map<juce::String, LineArea>& namedAreas)
{
if (item.area.isNotEmpty() && ! grid.templateAreas.isEmpty())
{
// Must be a named area!
jassert (namedAreas.count (item.area) != 0);
return namedAreas.at (item.area);
}
return { deduceLineRange (item.column, grid.templateColumns),
deduceLineRange (item.row, grid.templateRows) };
@ -349,11 +354,7 @@ struct Grid::PlacementHelpers
}
else
{
if (string == emptyAreaCharacter)
{
break;
}
else if (string == area.name)
if (string == area.name)
{
area.lines.row.end = stringsArrays.indexOf (stringArray) + 2;
area.lines.column.end = stringArray.indexOf (string) + 2;