Changeset 65 for trunk/Lucide/SOURCE/gui


Ignore:
Timestamp:
Jul 1, 2006, 12:10:52 PM (15 years ago)
Author:
Eugene Romanenko
Message:

fixed highlighting of found text in continuous view mode

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Lucide/SOURCE/gui/docViewer.cpp

    r61 r65  
    324324    if ( continuous && ( doc != NULL ) )
    325325    {
     326        bool needRedraw = ( page == currentpage );
    326327        double pgpos = pagenumToPos( page ) / VScrollStep;
    327328        vertScroll( hWndDoc, MPFROM2SHORT( pgpos, SB_SLIDERPOSITION ), NULLHANDLE );
     329        if ( needRedraw ) {
     330            drawPage();
     331        }
    328332    }
    329333    else
     
    13611365        }
    13621366    }
    1363     yinc = ( ( yinc / VScrollStep ) * VScrollStep );
    1364     if ( yinc != 0 ) {
     1367
     1368    if ( yinc != 0 )
     1369    {
     1370        SHORT remainder = yinc % VScrollStep;
     1371        if ( remainder != 0 ) {
     1372            SHORT add = VScrollStep - remainder;
     1373            yinc += ( ( yinc > 0 ) ? add : -add );
     1374        }
     1375
    13651376        vertScroll( hwnd, MPFROM2SHORT( ( ( sVscrollPos * VScrollStep ) + yinc ) / VScrollStep,
    13661377                                        SB_SLIDERPOSITION ), hrgn );
Note: See TracChangeset for help on using the changeset viewer.