diff options
| author | Felix (xq) Queißner <git@mq32.de> | 2020-06-06 22:23:20 +0200 |
|---|---|---|
| committer | Felix (xq) Queißner <git@mq32.de> | 2020-06-06 22:23:20 +0200 |
| commit | d9e105e6e0accf5def8681334341069117cab213 (patch) | |
| tree | 68764c76f67326aaa3f731ce70726e821c00e11a /mainwindow.cpp | |
| parent | 87d787bc2c50eb00c6b86957efaa71e07f9acc07 (diff) | |
| download | kristall-d9e105e6e0accf5def8681334341069117cab213.tar.gz | |
Navigation via outline is now possible. Sexy!
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); + } + } +} |
