Updated LibraryWindow::reloadAfterCopyMove for only re-fetching/updating the affected folders by a copy/move action

This commit is contained in:
Luis Ángel San Martín
2014-10-15 16:30:51 +02:00
parent 46e4cfceb9
commit ebf2ee72b2
5 changed files with 94 additions and 74 deletions

View File

@ -1399,6 +1399,7 @@ void LibraryWindow::updateTreeFolder()
void LibraryWindow::updateFolder(const QModelIndex & miFolder)
{
QLOG_DEBUG() << "UPDATE FOLDER!!!!";
updateDestination = miFolder;
importWidget->setUpdateLook();
@ -1425,8 +1426,7 @@ void LibraryWindow::reloadAfterCopyMove()
if(getCurrentFolderIndex() == updateDestination)
reloadCovers();
//TODO do not reload the whole model, just the current folder...
foldersModel->setupModelData(QDir::cleanPath(libraries.getPath(selectedLibrary->currentText())+"/.yacreaderlibrary"));
foldersModel->fetchMoreFromDB(updateDestination);
enableNeededActions();
}