Commit 135ad755 authored by Aloshi's avatar Aloshi

Fix editing metadata in a nested folder causing back button to stop working.

parent fac09b6f
......@@ -58,6 +58,26 @@ void BasicGameListView::setCursor(FileData* cursor)
{
populateList(cursor->getParent()->getChildren());
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();
}
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment