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:
parent
a1b6f2aa34
commit
4af9526ab5
1 changed files with 6 additions and 5 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue