From: José Aliste Date: Wed, 25 Nov 2009 11:49:52 +0000 (+0100) Subject: [libview] Fix rendering issue in dual/continuous mode X-Git-Tag: EVINCE_2_29_3~19 X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=commitdiff_plain;h=5b1074d5c1dcc9088a487190a1d3d9d58e3962a6;p=evince.git [libview] Fix rendering issue in dual/continuous mode Fixes bgo#602742. --- diff --git a/libview/ev-view.c b/libview/ev-view.c index 91ce4708..28c8f822 100644 --- a/libview/ev-view.c +++ b/libview/ev-view.c @@ -622,13 +622,13 @@ view_update_range_and_current_page (EvView *view) gboolean found = FALSE; gint area_max = -1, area; gint best_current_page = -1; - int i; + int i, j = 0; if (!(view->vadjustment && view->hadjustment)) return; current_area.x = view->hadjustment->value; - current_area.width = view->hadjustment->upper; + current_area.width = view->hadjustment->page_size; current_area.y = view->vadjustment->value; current_area.height = view->vadjustment->page_size; @@ -651,7 +651,15 @@ view_update_range_and_current_page (EvView *view) } view->end_page = i; + j = 0; } else if (found && view->current_page <= view->end_page) { + if (view->dual_page && j < 1) { + /* In dual mode we stop searching + * after two consecutive non-visible pages. + */ + j++; + continue; + } break; } }