diff --git a/RetroFE/Source/Graphics/Component/ScrollingList.cpp b/RetroFE/Source/Graphics/Component/ScrollingList.cpp index 685b37b..b964b0e 100644 --- a/RetroFE/Source/Graphics/Component/ScrollingList.cpp +++ b/RetroFE/Source/Graphics/Component/ScrollingList.cpp @@ -96,25 +96,8 @@ ScrollingList::ScrollingList(const ScrollingList ©) scrollPoints_ = NULL; tweenPoints_ = NULL; - if(copy.scrollPoints_) - { - scrollPoints_ = new std::vector(); - for(unsigned int i = 0; i < copy.scrollPoints_->size(); ++i) - { - ViewInfo *v = new ViewInfo(*copy.scrollPoints_->at(i)); - scrollPoints_->push_back(v); - } - } + setPoints(copy.scrollPoints_, copy.tweenPoints_); - if(copy.tweenPoints_) - { - tweenPoints_ = new std::vector(); - for(unsigned int i = 0; i < copy.tweenPoints_->size(); ++i) - { - AnimationEvents *v = new AnimationEvents(*copy.tweenPoints_->at(i)); - tweenPoints_->push_back(v); - } - } } @@ -176,6 +159,7 @@ void ScrollingList::allocateSpritePoints() { if(!items_ || items_->size() == 0) return; if(!scrollPoints_) return; + if(components_.size() == 0) return; for(unsigned int i = 0; i < scrollPoints_->size(); ++i) { diff --git a/RetroFE/Source/Graphics/Page.cpp b/RetroFE/Source/Graphics/Page.cpp index 1b24174..fb59e3d 100644 --- a/RetroFE/Source/Graphics/Page.cpp +++ b/RetroFE/Source/Graphics/Page.cpp @@ -447,9 +447,9 @@ bool Page::pushCollection(CollectionInfo *collection) // grow the menu as needed if(menus_.size() >= menuDepth_ && activeMenu_) { - ScrollingList *newList = new ScrollingList(*activeMenu_); - newList->forceIdle(); - pushMenu(newList); + activeMenu_ = new ScrollingList(*activeMenu_); + activeMenu_->forceIdle(); + pushMenu(activeMenu_); }