Added layer check when drawing components.

Increased maximum number of layers to 20.
This commit is contained in:
Pieter Hulshoff 2016-05-11 13:37:48 +02:00
parent 9150ec2079
commit 4e2cc30cc0
2 changed files with 2 additions and 2 deletions

View File

@ -703,7 +703,7 @@ void Page::draw()
{
for(std::vector<Component *>::iterator it = LayerComponents[i].begin(); it != LayerComponents[i].end(); ++it)
{
if(*it) (*it)->draw();
if(*it && (*it)->baseViewInfo.Layer == i) (*it)->draw();
}
for(MenuVector_T::iterator it = menus_.begin(); it != menus_.end(); it++)

View File

@ -111,7 +111,7 @@ private:
CollectionVector_T collections_;
CollectionVector_T deleteCollections_;
static const unsigned int NUM_LAYERS = 8;
static const unsigned int NUM_LAYERS = 20;
std::vector<Component *> LayerComponents[NUM_LAYERS];
std::list<ScrollingList *> deleteMenuList_;
std::list<CollectionInfo *> deleteCollectionList_;