commit 64ae0ccd23bad822602b094527098ce3c04857ee
Author: Bogdan Petcu <bogdanconstantinpetcu@gmail.com>
Date:   Thu Feb 27 18:17:56 2014 +0200

    modified code so when continuous option is changed the page isn't scrolled to it's top

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..024a4e5 100644
--- a/libview/ev-view.c
+++ b/libview/ev-view.c
@@ -564,6 +564,20 @@ scroll_to_point (EvView        *view,
 }
 
 static void
+ev_view_scroll_to_same_position (EvView *view, GtkOrientation orientation)
+{
+	gdouble x, y;
+
+	if (!view->document)
+		return;
+	
+	x = view->scroll_x;
+	y = view->scroll_y; 
+
+	scroll_to_point (view, x, y, orientation);
+}
+
+static void
 ev_view_scroll_to_page_position (EvView *view, GtkOrientation orientation)
 {
 	gdouble x, y;
@@ -637,6 +651,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 +682,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 +7159,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));
 }
 
