commit fb0c79aeb7f6eaa745537bfe8286c701afd6db3c
Author: Bogdan Petcu <bogdanconstantinpetcu@gmail.com>
Date:   Fri Feb 28 20:40:42 2014 +0200

    view point stays the same when switching from not-continuous to continuous

diff --git a/libview/ev-view-private.h b/libview/ev-view-private.h
index 7633c3a..776d1d1 100644
--- a/libview/ev-view-private.h
+++ b/libview/ev-view-private.h
@@ -98,6 +98,7 @@ typedef enum {
 	SCROLL_TO_PAGE_POSITION,
 	SCROLL_TO_CENTER,
 	SCROLL_TO_FIND_LOCATION,
+	SCROLL_TO_SAME_POSITION,
 } PendingScroll;
 
 typedef struct _EvHeightToPageCache {
diff --git a/libview/ev-view.c b/libview/ev-view.c
index 9f62738..7056bcc 100644
--- a/libview/ev-view.c
+++ b/libview/ev-view.c
@@ -592,6 +592,25 @@ ev_view_scroll_to_page_position (EvView *view, GtkOrientation orientation)
 }
 
 static void
+ev_view_scroll_to_same_position (EvView *view, GtkOrientation orientation)
+{
+	gdouble current_x, current_y;
+
+	if (!view->document)
+		return;
+
+	if(view->continuous){	
+		current_x = view->scroll_x;
+		current_y = view->scroll_y;
+		ev_view_scroll_to_page_position (view, orientation);
+		scroll_to_point (view, current_x + view->scroll_x, current_y + view->scroll_y, orientation);
+	} else {
+		ev_view_scroll_to_page_position (view, orientation);
+	}
+				
+}
+
+static void
 ev_view_set_adjustment_values (EvView         *view,
 			       GtkOrientation  orientation)
 {
@@ -637,6 +656,8 @@ ev_view_set_adjustment_values (EvView         *view,
     	        case SCROLL_TO_CENTER:
 			factor = (value + page_size * 0.5) / upper;
 			break;
+		case SCROLL_TO_SAME_POSITION:
+			break;
 		}
 	}
 
@@ -666,6 +687,9 @@ ev_view_set_adjustment_values (EvView         *view,
 					   0, upper - page_size);
 			gtk_adjustment_set_value (adjustment, (int)new_value);
 			break;
+		case SCROLL_TO_SAME_POSITION:
+			ev_view_scroll_to_same_position (view, orientation);
+			break;
 	}
 
 	gtk_adjustment_changed (adjustment);
@@ -7140,7 +7164,7 @@ ev_view_continuous_changed_cb (EvDocumentModel *model,
 	gboolean continuous = ev_document_model_get_continuous (model);
 
 	view->continuous = continuous;
-	view->pending_scroll = SCROLL_TO_PAGE_POSITION;
+	view->pending_scroll = SCROLL_TO_SAME_POSITION;
 	gtk_widget_queue_resize (GTK_WIDGET (view));
 }
 
