mirror of
https://github.com/YACReader/yacreader
synced 2025-06-04 01:28:55 -04:00
Fix folder selection on search mode
This commit is contained in:
parent
3bb8f88e3c
commit
50ca560f5a
@ -36,8 +36,8 @@ void YACReaderNavigationController::selectedFolder(const QModelIndex &mi)
|
|||||||
|
|
||||||
// when a folder is selected the search mode has to be reset
|
// when a folder is selected the search mode has to be reset
|
||||||
if (libraryWindow->exitSearchMode()) {
|
if (libraryWindow->exitSearchMode()) {
|
||||||
libraryWindow->foldersView->scrollTo(mi, QAbstractItemView::PositionAtTop);
|
libraryWindow->foldersView->scrollTo(modelIndex, QAbstractItemView::PositionAtTop);
|
||||||
libraryWindow->foldersView->setCurrentIndex(mi);
|
libraryWindow->foldersView->setCurrentIndex(modelIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
loadFolderInfo(modelIndex);
|
loadFolderInfo(modelIndex);
|
||||||
@ -262,9 +262,7 @@ void YACReaderNavigationController::loadPreviousStatus()
|
|||||||
|
|
||||||
void YACReaderNavigationController::setupConnections()
|
void YACReaderNavigationController::setupConnections()
|
||||||
{
|
{
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
|
||||||
connect(libraryWindow->foldersView, &YACReaderTreeView::currentIndexChanged, this, &YACReaderNavigationController::selectedFolder);
|
connect(libraryWindow->foldersView, &YACReaderTreeView::currentIndexChanged, this, &YACReaderNavigationController::selectedFolder);
|
||||||
#endif
|
|
||||||
connect(libraryWindow->foldersView, &YACReaderTreeView::clicked, this, &YACReaderNavigationController::selectedFolder);
|
connect(libraryWindow->foldersView, &YACReaderTreeView::clicked, this, &YACReaderNavigationController::selectedFolder);
|
||||||
connect(libraryWindow->listsView, &QAbstractItemView::clicked, this, &YACReaderNavigationController::selectedList);
|
connect(libraryWindow->listsView, &QAbstractItemView::clicked, this, &YACReaderNavigationController::selectedList);
|
||||||
connect(libraryWindow->historyController, &YACReaderHistoryController::modelIndexSelected, this, &YACReaderNavigationController::selectedIndexFromHistory);
|
connect(libraryWindow->historyController, &YACReaderHistoryController::modelIndexSelected, this, &YACReaderNavigationController::selectedIndexFromHistory);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user