Commit 7647ba06 authored by Philipp Erhardt's avatar Philipp Erhardt
Browse files

Store jump when using the ToC

parent 915eea73
......@@ -45,10 +45,12 @@ void Toc::goto_link(QTreeWidgetItem *item, int column) {
if (column == -1) {
return;
}
int old_page = viewer->get_canvas()->get_layout()->get_page();
Poppler::LinkDestination *link = item->data(0, Qt::UserRole).value<Poppler::LinkDestination *>();
if (viewer->get_canvas()->get_layout()->goto_link_destination(link)) {
viewer->get_canvas()->update();
}
viewer->get_res()->store_jump(old_page);
viewer->get_canvas()->setFocus(Qt::OtherFocusReason);
}
......
Supports Markdown
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