Fix atlas free bug
This commit is contained in:
parent
a66e584be0
commit
f7e17f27b9
1 changed files with 2 additions and 2 deletions
|
|
@ -172,14 +172,14 @@ void RectPacker::Free(RectPackerItem* item)
|
|||
// If next item is available space we can merge them
|
||||
if (item->NextItem && item->NextItem->IsAvailable)
|
||||
{
|
||||
item->Height += item->NextItem->Height;
|
||||
item->Width += item->NextItem->Width;
|
||||
FreeItem(item->NextItem);
|
||||
}
|
||||
|
||||
// If previous item is available space we can merge them
|
||||
if (item->PrevItem && item->PrevItem->IsAvailable)
|
||||
{
|
||||
item->PrevItem->Height += item->Height;
|
||||
item->PrevItem->Width += item->Width;
|
||||
FreeItem(item);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue