~ubuntu-branches/ubuntu/maverick/kdegraphics/maverick-proposed

« back to all changes in this revision

Viewing changes to okular/ui/pageviewannotator.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Thomas
  • Date: 2009-12-02 14:03:43 UTC
  • mfrom: (1.1.35 upstream)
  • Revision ID: james.westby@ubuntu.com-20091202140343-2732gbkj69g89arq
Tags: 4:4.3.80-0ubuntu1
* New upstream beta release:
  - Add build-depend on shared-desktop-ontologies for nepomuk integration
  - Bump .so versions for libkexiv, libkdcraw and libkipi
  - Update various .install files

Show diffs side-by-side

added added

removed removed

Lines of Context:
748
748
 
749
749
    // find out normalized mouse coords inside current item
750
750
    const QRect & itemRect = item->uncroppedGeometry();
751
 
    double nX = item->absToPageX(e->x());
752
 
    double nY = item->absToPageY(e->y());
 
751
    const QPoint eventPos = m_pageView->contentAreaPoint( e->pos() );
 
752
    double nX = item->absToPageX( eventPos.x() );
 
753
    double nY = item->absToPageY( eventPos.y() );
753
754
 
754
755
    QRect modifiedRect;
755
756
 
774
775
        m_lastDrawnRect.translate( itemRect.left(), itemRect.top() );
775
776
        // 3.2. decompose paint region in rects and send paint events
776
777
        QVector<QRect> rects = compoundRegion.unite( m_lastDrawnRect ).rects();
 
778
        const QPoint areaPos = m_pageView->contentAreaPosition();
777
779
        for ( int i = 0; i < rects.count(); i++ )
778
 
            m_pageView->widget()->update( rects[i] );
 
780
            m_pageView->viewport()->update( rects[i].translated( -areaPos ) );
779
781
        modifiedRect = compoundRegion.boundingRect() | m_lastDrawnRect;
780
782
    }
781
783
 
857
859
    m_lockedItem = 0;
858
860
    if ( m_lastDrawnRect.isValid() )
859
861
    {
860
 
        m_pageView->widget()->update( m_lastDrawnRect );
 
862
        m_pageView->viewport()->update( m_lastDrawnRect.translated( -m_pageView->contentAreaPosition() ) );
861
863
        m_lastDrawnRect = QRect();
862
864
    }
863
865
 
915
917
 
916
918
        // consistancy warning
917
919
        if ( !m_engine )
 
920
        {
918
921
            kWarning() << "tools.xml: couldn't find good engine description. check xml.";
 
922
        }
919
923
 
920
924
        // stop after parsing selected tool's node
921
925
        break;
929
933
}
930
934
 
931
935
#include "pageviewannotator.moc"
 
936
 
 
937
/* kate: replace-tabs on; indent-width 4; */