corregida la actualizaci?n del historico de navegaci?n

This commit is contained in:
Luis Ángel San Martín
2013-06-18 20:49:20 +02:00
parent 88466da9e4
commit 8f22c65c83

View File

@ -1268,6 +1268,8 @@ void LibraryWindow::setRootIndex()
if(d.exists(path))
{
loadCovers(QModelIndex());
if(history.count()>1)
updateHistory(QModelIndex());
}
else
{
@ -1599,18 +1601,21 @@ void LibraryWindow::forward()
void LibraryWindow::updateHistory(const QModelIndex &mi)
{
//remove history from current index
int numElementsToRemove = history.count() - (currentFolderNavigation+1);
while(numElementsToRemove>0)
{
numElementsToRemove--;
history.removeLast();
}
//remove history from current index
int numElementsToRemove = history.count() - (currentFolderNavigation+1);
while(numElementsToRemove>0)
{
numElementsToRemove--;
history.removeLast();
}
backAction->setEnabled(true);
history.append(mi);
if(mi!=history.at(currentFolderNavigation))
{
history.append(mi);
currentFolderNavigation++;
backAction->setEnabled(true);
currentFolderNavigation++;
}
forwardAction->setEnabled(false);
}