mirror of
https://github.com/FunKey-Project/RetroFE.git
synced 2025-12-13 10:18:53 +01:00
Fixed multiwheel crash (bug from copy constructor).
This commit is contained in:
parent
1c67c485c3
commit
ba5b3ffff7
@ -96,25 +96,8 @@ ScrollingList::ScrollingList(const ScrollingList ©)
|
||||
scrollPoints_ = NULL;
|
||||
tweenPoints_ = NULL;
|
||||
|
||||
if(copy.scrollPoints_)
|
||||
{
|
||||
scrollPoints_ = new std::vector<ViewInfo *>();
|
||||
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<AnimationEvents *>();
|
||||
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)
|
||||
{
|
||||
|
||||
@ -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_);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user