Resolve page-jumping while zooming on last page

Resolves the problem of jumping to a wrong possition
that occured while zooming on the last page of the document

Fixes: #166
This commit is contained in:
Moritz Lipp 2012-05-01 10:23:00 +02:00
parent 9e643d4224
commit b7b8f53cbe

View file

@ -323,8 +323,8 @@ readjust_view_after_zooming(zathura_t *zathura, float old_zoom) {
double scale = zathura_document_get_scale(zathura->document);
gdouble valx = gtk_adjustment_get_value(hadjustment) / old_zoom * scale;
gdouble valy = gtk_adjustment_get_value(vadjustment) / old_zoom * scale;
set_adjustment(hadjustment, valx);
set_adjustment(vadjustment, valy);
position_set_delayed(zathura, valx, valy);
}
void