mirror of
https://github.com/YACReader/yacreader
synced 2025-05-28 03:10:27 -04:00
Enable/disable comics actions after updating search results
Before this commit starting a search when an empty folder or an empty reading list was selected left all comics actions disabled. Fixes #213. When search mode is exited, we always call either YACReaderNavigationController::loadFolderInfo() or YACReaderNavigationController::loadListInfo(). Both of them call LibraryWindow::disableComicsActions(), so the enabled/disabled state of the comics actions stays up-to-date at all times.
This commit is contained in:
parent
c4333915c9
commit
3fcf31d936
@ -2165,10 +2165,13 @@ void LibraryWindow::setComicSearchFilterData(QList<ComicItem *> *data, const QSt
|
||||
comicsViewsManager->comicsView->enableFilterMode(true);
|
||||
comicsViewsManager->comicsView->setModel(comicsModel); //TODO, columns are messed up after ResetModel some times, this shouldn't be necesary
|
||||
|
||||
if (comicsModel->rowCount() == 0)
|
||||
if (comicsModel->rowCount() == 0) {
|
||||
comicsViewsManager->showNoSearchResultsView();
|
||||
else
|
||||
disableComicsActions(true);
|
||||
} else {
|
||||
comicsViewsManager->showComicsView();
|
||||
disableComicsActions(false);
|
||||
}
|
||||
}
|
||||
|
||||
void LibraryWindow::setFolderSearchFilterData(QMap<unsigned long long, FolderItem *> *filteredItems, FolderItem *root)
|
||||
|
Loading…
Reference in New Issue
Block a user