diff Samples/Common/AngleMeasureTool.cpp @ 654:462a5074f914

Turned the scene into an observable to be able to dynamically react to scene to canvas transform changes --> now the handles and angle measure adornments are immune to zoom changes
author Benjamin Golinvaux <bgo@osimis.io>
date Tue, 14 May 2019 13:51:00 +0200
parents 62f6ff016085
children 002d9562c8f5
line wrap: on
line diff
--- a/Samples/Common/AngleMeasureTool.cpp	Tue May 14 13:49:12 2019 +0200
+++ b/Samples/Common/AngleMeasureTool.cpp	Tue May 14 13:51:00 2019 +0200
@@ -145,13 +145,13 @@
 
           {
             PolylineSceneLayer::Chain chain;
-            AddSquare(chain, GetScene(), side1End_, 10.0); //TODO: take DPI into account
+            AddSquare(chain, GetScene(), side1End_, 10.0* pixelToScene); //TODO: take DPI into account
             polylineLayer->AddChain(chain, true);
           }
 
           {
             PolylineSceneLayer::Chain chain;
-            AddSquare(chain, GetScene(), side2End_, 10.0); //TODO: take DPI into account
+            AddSquare(chain, GetScene(), side2End_, 10.0* pixelToScene); //TODO: take DPI into account
             polylineLayer->AddChain(chain, true);
           }
         }