Commit f29f955a authored by Peter Mühlenpfordt's avatar Peter Mühlenpfordt Committed by Henrik Fehlauer

Initial focus to thumbnails in browse mode

Summary:
On initializing the widgets set focus to thumbnails instead of folder tree or url bar.
Select first item in thumbnail view if nothing else is selected.

BUG: 312631

Reviewers: rkflx

Reviewed By: rkflx

Subscribers: ngraham

Differential Revision: https://phabricator.kde.org/D8934
parent 3d4dfd9f
......@@ -260,6 +260,8 @@ struct MainWindow::Private
mCentralSplitter->setStretchFactor(0, 0);
mCentralSplitter->setStretchFactor(1, 1);
mThumbnailView->setFocus();
connect(mSaveBar, SIGNAL(requestSaveAll()),
mGvCore, SLOT(saveAll()));
connect(mSaveBar, SIGNAL(goToUrl(QUrl)),
......@@ -1148,6 +1150,11 @@ void MainWindow::slotDirListerCompleted()
}
if (d->mContextManager->selectionModel()->hasSelection()) {
updatePreviousNextActions();
} else {
QModelIndex index = d->mThumbnailView->model()->index(0, 0);
if (index.isValid()) {
d->mThumbnailView->setCurrentIndex(index);
}
}
d->mThumbnailView->scrollToSelectedIndex();
d->mViewMainPage->thumbnailBar()->scrollToSelectedIndex();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment