Changeset 206

Show
Ignore:
Timestamp:
06/10/06 06:52:22 (2 years ago)
Author:
jordi
Message:

Now when the document is loaded checks if really it has more than one page before adding the second to the render queue. (I assume that document has at least one page.)

Location:
trunk/src
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/DocumentPage.cxx

    r196 r206  
    3030{ 
    3131    m_Data = NULL; 
    32     m_HasSelection = FALSE;     
     32    m_HasSelection = FALSE; 
    3333    m_Height = 0; 
    3434    m_LinkList = NULL; 
     
    212212    g_assert ( 1 <= width && "Tried to create a 0 width page."); 
    213213    g_assert ( 1 <= height && "Tried to create a 0 height page."); 
    214      
     214 
    215215    m_Width = width; 
    216216    m_Height = height; 
     
    223223        memset (m_Data, 0xff, dataSize); 
    224224    } 
    225      
     225 
    226226    return NULL != m_Data; 
    227227} 
  • trunk/src/IDocument.cxx

    r201 r206  
    277277IDocument::notifyLoad () 
    278278{ 
    279     // Add the two first pages to the cache. 
     279    // Add the two first pages, if they exists, to the cache. 
    280280    addPageToCache (1); 
    281     addPageToCache (2); 
     281    if ( 1 < getNumPages () ) 
     282    { 
     283        addPageToCache (2); 
     284    } 
    282285 
    283286    for ( GList *item = g_list_first (m_Observers) ; NULL != item ; 
     
    11191122    { 
    11201123        m_CurrentPage = pageNum; 
    1121          
     1124 
    11221125        addPageToCache (m_CurrentPage); 
    11231126        if ( 1 < m_CurrentPage )