mirror of
https://github.com/YACReader/yacreader
synced 2026-02-21 22:43:00 -05:00
corregida la actualizaci?n del historico de navegaci?n
This commit is contained in:
@ -1268,6 +1268,8 @@ void LibraryWindow::setRootIndex()
|
|||||||
if(d.exists(path))
|
if(d.exists(path))
|
||||||
{
|
{
|
||||||
loadCovers(QModelIndex());
|
loadCovers(QModelIndex());
|
||||||
|
if(history.count()>1)
|
||||||
|
updateHistory(QModelIndex());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1599,18 +1601,21 @@ void LibraryWindow::forward()
|
|||||||
|
|
||||||
void LibraryWindow::updateHistory(const QModelIndex &mi)
|
void LibraryWindow::updateHistory(const QModelIndex &mi)
|
||||||
{
|
{
|
||||||
//remove history from current index
|
//remove history from current index
|
||||||
int numElementsToRemove = history.count() - (currentFolderNavigation+1);
|
int numElementsToRemove = history.count() - (currentFolderNavigation+1);
|
||||||
while(numElementsToRemove>0)
|
while(numElementsToRemove>0)
|
||||||
{
|
{
|
||||||
numElementsToRemove--;
|
numElementsToRemove--;
|
||||||
history.removeLast();
|
history.removeLast();
|
||||||
}
|
}
|
||||||
|
|
||||||
backAction->setEnabled(true);
|
if(mi!=history.at(currentFolderNavigation))
|
||||||
history.append(mi);
|
{
|
||||||
|
history.append(mi);
|
||||||
|
|
||||||
currentFolderNavigation++;
|
backAction->setEnabled(true);
|
||||||
|
currentFolderNavigation++;
|
||||||
|
}
|
||||||
|
|
||||||
forwardAction->setEnabled(false);
|
forwardAction->setEnabled(false);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user