[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdegraphics/kpdf/ui
From:       Albert Astals Cid <tsdgeos () terra ! es>
Date:       2005-05-12 10:17:47
Message-ID: 1115893067.095781.14404.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 412670 by aacid:

Fordward port fix for bug 105454


 M  +7 -7      trunk/KDE/kdegraphics/kpdf/ui/pageview.cpp  


--- trunk/KDE/kdegraphics/kpdf/ui/pageview.cpp #412669:412670
@@ -887,22 +887,22 @@
             {
                 double nX = (double)(e->x() - pageItem->geometry().left()) / (double)pageItem->width(),
                        nY = (double)(e->y() - pageItem->geometry().top()) / (double)pageItem->height();
-                const ObjectRect * rect;
-                rect = pageItem->page()->hasObject( ObjectRect::Link, nX, nY );
-                if ( rect )
+                const ObjectRect * linkRect, * imageRect;
+                linkRect = pageItem->page()->hasObject( ObjectRect::Link, nX, nY );
+                if ( linkRect )
                 {
                     // handle click over a link
-                    const KPDFLink * link = static_cast< const KPDFLink * >( rect->pointer() );
+                    const KPDFLink * link = static_cast< const KPDFLink * >( linkRect->pointer() );
                     d->document->processLink( link );
                 }
 
-                rect = pageItem->page()->hasObject( ObjectRect::Image, nX, nY );
-                if ( rect )
+                imageRect = pageItem->page()->hasObject( ObjectRect::Image, nX, nY );
+                if ( imageRect )
                 {
                     // handle click over a image
                 }
 
-                if (!rect)
+                if (!linkRect && !imageRect)
                 {
                     // if not on a rect, the click selects the page
                     d->document->setViewportPage( pageItem->pageNumber(), PAGEVIEW_ID );
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic