Merge pull request #9570 from liamcindy/UIListView

override function for listview
This commit is contained in:
minggo 2014-12-23 14:25:46 +08:00
commit 90a7f99873
3 changed files with 14 additions and 1 deletions

View File

@ -270,7 +270,7 @@ public:
/** /**
* force refresh widget layout * force refresh widget layout
*/ */
void forceDoLayout(); virtual void forceDoLayout();
/** /**
* request to refresh widget layout * request to refresh widget layout

View File

@ -453,6 +453,17 @@ void ListView::refreshView()
updateInnerContainerSize(); updateInnerContainerSize();
} }
void ListView::forceDoLayout()
{
if (_refreshViewDirty)
{
refreshView();
_refreshViewDirty = false;
}
this->_innerContainer->forceDoLayout();
}
void ListView::doLayout() void ListView::doLayout()
{ {
Layout::doLayout(); Layout::doLayout();

View File

@ -162,6 +162,8 @@ public:
float getItemsMargin()const; float getItemsMargin()const;
virtual void forceDoLayout()override;
virtual void doLayout() override; virtual void doLayout() override;
virtual void addChild(Node* child)override; virtual void addChild(Node* child)override;