diff view/ViewProxy.h @ 954:17cb48115d22 osx-retina

Fix positioning of local feature illumination rectangle
author Chris Cannam
date Wed, 29 Apr 2015 13:02:57 +0100
parents 43888f891733
children 477fbf3f10ca
line wrap: on
line diff
--- a/view/ViewProxy.h	Wed Apr 29 12:37:23 2015 +0100
+++ b/view/ViewProxy.h	Wed Apr 29 13:02:57 2015 +0100
@@ -85,9 +85,15 @@
 		     r.width() * m_scaleFactor,
 		     r.height() * m_scaleFactor);
     }
-    virtual QSize getPaintSize() const { return getPaintRect().size(); }
-    virtual int getPaintWidth() const { return getPaintRect().width(); }
-    virtual int getPaintHeight() const { return getPaintRect().height(); }
+    virtual QSize getPaintSize() const {
+        return getPaintRect().size();
+    }
+    virtual int getPaintWidth() const { 
+        return getPaintRect().width();
+    }
+    virtual int getPaintHeight() const { 
+        return getPaintRect().height();
+    }
     virtual bool hasLightBackground() const {
 	return m_view->hasLightBackground();
     }
@@ -101,9 +107,14 @@
 	return m_view->getViewManager();
     }
 	
-    virtual bool shouldIlluminateLocalFeatures(const Layer *layer, QPoint &point) const {
-	return m_view->shouldIlluminateLocalFeatures(layer, point);
+    virtual bool shouldIlluminateLocalFeatures(const Layer *layer,
+                                               QPoint &point) const {
+        QPoint p;
+	bool should = m_view->shouldIlluminateLocalFeatures(layer, p);
+        point = QPoint(p.x() * m_scaleFactor, p.y() * m_scaleFactor);
+        return should;
     }
+
     virtual bool shouldShowFeatureLabels() const {
 	return m_view->shouldShowFeatureLabels();
     }