| 25 | } |
| 26 | |
| 27 | void YACReaderNavigationController::selectedFolder(const QModelIndex &mi) |
| 28 | { |
| 29 | // A proxy is used |
| 30 | QModelIndex modelIndex = libraryWindow->foldersModelProxy->mapToSource(mi); |
| 31 | |
| 32 | // update history |
| 33 | libraryWindow->historyController->updateHistory(YACReaderLibrarySourceContainer(modelIndex, YACReaderLibrarySourceContainer::Folder)); |
| 34 | |
| 35 | // when a folder is selected the search mode has to be reset |
| 36 | if (libraryWindow->exitSearchMode()) { |
| 37 | libraryWindow->foldersView->scrollTo(modelIndex, QAbstractItemView::PositionAtTop); |
| 38 | libraryWindow->foldersView->setCurrentIndex(modelIndex); |
| 39 | } |
| 40 | |
| 41 | loadFolderInfo(modelIndex); |
| 42 | |
| 43 | libraryWindow->setToolbarTitle(modelIndex); |
| 44 | } |
| 45 | |
| 46 | void YACReaderNavigationController::reselectCurrentFolder() |
| 47 | { |
no test coverage detected