summaryrefslogtreecommitdiff
path: root/print/okular/patches
diff options
context:
space:
mode:
authorjperkin <jperkin>2015-01-06 11:40:33 +0000
committerjperkin <jperkin>2015-01-06 11:40:33 +0000
commit712a8cca11485adf0afaf25c9cd7802d14a46651 (patch)
tree6f18f1b32a9f1971da5352c06772cf84009f4c66 /print/okular/patches
parenta1a9b773fbe5c6a6f75f81da91bd0d55feefb328 (diff)
downloadpkgsrc-712a8cca11485adf0afaf25c9cd7802d14a46651.tar.gz
Avoid ambiguous overloaded function call.
Diffstat (limited to 'print/okular/patches')
-rw-r--r--print/okular/patches/patch-ui_pageview.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/print/okular/patches/patch-ui_pageview.cpp b/print/okular/patches/patch-ui_pageview.cpp
new file mode 100644
index 00000000000..a52a2380c1e
--- /dev/null
+++ b/print/okular/patches/patch-ui_pageview.cpp
@@ -0,0 +1,15 @@
+$NetBSD: patch-ui_pageview.cpp,v 1.1 2015/01/06 11:40:33 jperkin Exp $
+
+Avoid ambiguous overloaded function call.
+
+--- ui/pageview.cpp.orig 2014-11-06 22:38:13.000000000 +0000
++++ ui/pageview.cpp
+@@ -2351,7 +2351,7 @@ void PageView::mouseReleaseEvent( QMouse
+ double distance = 0.0;
+ rect = pageItem->page()->nearestObjectRect( Okular::ObjectRect::SourceRef, nX, nY, pageItem->uncroppedWidth(), pageItem->uncroppedHeight(), &distance );
+ // distance is distanceSqr, adapt it to a normalized value
+- distance = distance / (pow( pageItem->uncroppedWidth(), 2 ) + pow( pageItem->uncroppedHeight(), 2 ));
++ distance = distance / (pow( (float)pageItem->uncroppedWidth(), 2.0 ) + pow( (float)pageItem->uncroppedHeight(), 2.0 ));
+ if ( rect && ( distance > s_minDistance ) )
+ rect = 0;
+ }