Changeset 2293

Show
Ignore:
Timestamp:
03/08/10 15:59:35 (5 months ago)
Author:
gm78
Message:

Closes #517. Strip charts are now rebuilt only if the print options have changed

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • FalconView/trunk/public/Applications/FalconView/PrintToolOverlay/PrntTool.cpp

    r1369 r2293  
    11991199 
    12001200   // set the page width and page height in inches 
     1201   const double oldPageWidthIn = m_dPageWidthIn; 
     1202   const double oldPageHeightIn = m_dPageHeightIn; 
    12011203   set_printable_area_from_print_DC(); 
    12021204 
    12031205   // We need to re-build all area and strip charts for all open print 
    1204    // tools 
    1205    int status; 
    1206    while ( pOvl ) 
    1207    { 
    1208       status = pOvl->OnSetPrinterDefaults(); 
    1209  
    1210       // FAILURE should not occur 
    1211       if (status == FAILURE) 
    1212       { 
    1213          ERR_report("OnSetPrinterDefaults() failed."); 
    1214          failure_count++; 
    1215       } 
    1216       // SURFACE_TOO_LARGE can occur for certain paper sizes 
    1217       else if (status == SURFACE_TOO_LARGE) 
    1218          invalid_surface_count++;       
    1219  
    1220       OVL_get_overlay_manager()->InvalidateOverlay(pOvl); 
    1221  
    1222       pOvl = (CPrintToolOverlay*)  
    1223          OVL_get_overlay_manager()->get_next_of_type(pOvl, FVWID_Overlay_PageLayout); 
     1206   // tools if the page width or height has changed 
     1207   if (oldPageWidthIn != m_dPageWidthIn || oldPageHeightIn != m_dPageHeightIn) 
     1208   { 
     1209      int status; 
     1210      while ( pOvl ) 
     1211      { 
     1212         status = pOvl->OnSetPrinterDefaults(); 
     1213 
     1214         // FAILURE should not occur 
     1215         if (status == FAILURE) 
     1216         { 
     1217            ERR_report("OnSetPrinterDefaults() failed."); 
     1218            failure_count++; 
     1219         } 
     1220         // SURFACE_TOO_LARGE can occur for certain paper sizes 
     1221         else if (status == SURFACE_TOO_LARGE) 
     1222            invalid_surface_count++;       
     1223 
     1224         OVL_get_overlay_manager()->InvalidateOverlay(pOvl); 
     1225 
     1226         pOvl = (CPrintToolOverlay*)  
     1227            OVL_get_overlay_manager()->get_next_of_type(pOvl, FVWID_Overlay_PageLayout); 
     1228      } 
    12241229   } 
    12251230}