]> www.fi.muni.cz Git - evince.git/commitdiff
Fix several page size caching bugs
authorMarco Pesenti Gritti <mpg@redhat.com>
Fri, 15 Apr 2005 12:01:05 +0000 (12:01 +0000)
committerMarco Pesenti Gritti <marco@src.gnome.org>
Fri, 15 Apr 2005 12:01:05 +0000 (12:01 +0000)
2005-04-15  Marco Pesenti Gritti <mpg@redhat.com>

        * backend/ev-page-cache.c: (_ev_page_cache_new):

        Fix several page size caching bugs

ChangeLog
backend/ev-page-cache.c

index eead1ca577b27a73a71ef09e715bb0f4edec0f96..26608b5158eb486919ac669c3b778e5221e7edf9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2005-04-15  Marco Pesenti Gritti <mpg@redhat.com>
+
+       * backend/ev-page-cache.c: (_ev_page_cache_new):
+
+       Fix several page size caching bugs
+
 2005-04-15  Luca Ferretti <elle.uca@libero.it>
 
        * shell/ev-window.c: (set_action_properties):
index 4d64ee2e53740a30e2221421506d7350654c841a..5a713dab8bdb092a150f8b2d5005680cb007fc54 100644 (file)
@@ -123,17 +123,17 @@ _ev_page_cache_new (EvDocument *document)
 
                        page_cache->size_cache = g_new0 (EvPageCacheInfo, page_cache->n_pages);
 
-                       for (j = 1; j < i; j++) {
-                               info = &(page_cache->size_cache [j - 1]);
-                               info->width = page_width;
-                               info->height = page_height;
+                       for (j = 0; j < i; j++) {
+                               info = &(page_cache->size_cache [j]);
+                               info->width = page_cache->uniform_width;
+                               info->height = page_cache->uniform_height;
                        }
                        page_cache->uniform = FALSE;
 
                }
 
                if (! page_cache->uniform) {
-                       info = &(page_cache->size_cache [i - 1]);
+                       info = &(page_cache->size_cache [i]);
 
                        info->width = page_width;
                        info->height = page_height;