mirror of https://github.com/axmolengine/axmol.git
fix listview insert child at index bug
This commit is contained in:
parent
21647839b6
commit
4fa1af584c
|
@ -987,10 +987,14 @@ LayoutManager* Layout::createLayoutManager()
|
||||||
|
|
||||||
void Layout::doLayout()
|
void Layout::doLayout()
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!_doLayoutDirty)
|
if (!_doLayoutDirty)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sortAllChildren();
|
||||||
|
|
||||||
LayoutManager* executant = this->createLayoutManager();
|
LayoutManager* executant = this->createLayoutManager();
|
||||||
|
|
||||||
if (executant)
|
if (executant)
|
||||||
|
|
|
@ -261,10 +261,7 @@ void Widget::setContentSize(const cocos2d::Size &contentSize)
|
||||||
{
|
{
|
||||||
_contentSize = getVirtualRendererSize();
|
_contentSize = getVirtualRendererSize();
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
_contentSize = contentSize;
|
|
||||||
}
|
|
||||||
if (_running)
|
if (_running)
|
||||||
{
|
{
|
||||||
Widget* widgetParent = getWidgetParent();
|
Widget* widgetParent = getWidgetParent();
|
||||||
|
|
Loading…
Reference in New Issue