Commit 5f4eed24 authored by Philipp Erhardt's avatar Philipp Erhardt

Fix clicking links

When clicking on a link while viewing more than one column the target
page was wrong.
parent ea14656f
......@@ -801,7 +801,8 @@ bool GridLayout::click_mouse(int mx, int my) {
if (page.second.x() >= r.left() && page.second.x() < r.right()) {
if (page.second.y() < r.top() && page.second.y() >= r.bottom()) {
int new_page = (*it)->destination().pageNumber();
scroll_page((new_page - 1) / grid->get_column_count(), false);
// TODO scroll_smooth() to the link position
scroll_page(new_page - 1, false);
return true;
}
}
......
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