From kde-commits Thu May 12 10:12:44 2005 From: Albert Astals Cid Date: Thu, 12 May 2005 10:12:44 +0000 To: kde-commits Subject: branches/KDE/3.4/kdegraphics/kpdf/ui Message-Id: <1115892764.811354.14172.nullmailer () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=111589279130624 SVN commit 412667 by aacid: Fix bug introduced when fixing 101648 BUGS: 105454 M +7 -7 branches/KDE/3.4/kdegraphics/kpdf/ui/pageview.cpp --- branches/KDE/3.4/kdegraphics/kpdf/ui/pageview.cpp #412666:412667 @@ -876,22 +876,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 );