mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-22 14:15:38 +00:00
Fix editing metadata in a nested folder causing back button to stop working.
This commit is contained in:
parent
fac09b6fac
commit
135ad755b1
|
@ -58,6 +58,26 @@ void BasicGameListView::setCursor(FileData* cursor)
|
||||||
{
|
{
|
||||||
populateList(cursor->getParent()->getChildren());
|
populateList(cursor->getParent()->getChildren());
|
||||||
mList.setCursor(cursor);
|
mList.setCursor(cursor);
|
||||||
|
|
||||||
|
// update our cursor stack in case our cursor just got set to some folder we weren't in before
|
||||||
|
if(mCursorStack.empty() || mCursorStack.top() != cursor->getParent())
|
||||||
|
{
|
||||||
|
std::stack<FileData*> tmp;
|
||||||
|
FileData* ptr = cursor->getParent();
|
||||||
|
while(ptr && ptr != mRoot)
|
||||||
|
{
|
||||||
|
tmp.push(ptr);
|
||||||
|
ptr = ptr->getParent();
|
||||||
|
}
|
||||||
|
|
||||||
|
// flip the stack and put it in mCursorStack
|
||||||
|
mCursorStack = std::stack<FileData*>();
|
||||||
|
while(!tmp.empty())
|
||||||
|
{
|
||||||
|
mCursorStack.push(tmp.top());
|
||||||
|
tmp.pop();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue