diff options
Diffstat (limited to 'mainwindow.cpp')
| -rw-r--r-- | mainwindow.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/mainwindow.cpp b/mainwindow.cpp index 3682891..4b8d692 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -183,3 +183,15 @@ void MainWindow::on_nav_forward() tab->navOneForward(); } } + +void MainWindow::on_outline_view_clicked(const QModelIndex &index) +{ + BrowserTab * tab = qobject_cast<BrowserTab*>(this->ui->browser_tabs->currentWidget()); + if(tab != nullptr) { + + auto anchor = tab->outline.getAnchor(index); + if(not anchor.isEmpty()) { + tab->scrollToAnchor(anchor); + } + } +} |
