diff Framework/Scene2D/Internals/FixedPointAligner.h @ 1305:a5326ce4f24b broker

Trackers and measuring tools now use the viewport instead of ViewportController, so that proper locks can be used
author Benjamin Golinvaux <bgo@osimis.io>
date Wed, 04 Mar 2020 09:45:38 +0100
parents 2d8ab34c8c91
children ab81ee8fce1f
line wrap: on
line diff
--- a/Framework/Scene2D/Internals/FixedPointAligner.h	Wed Mar 04 09:44:34 2020 +0100
+++ b/Framework/Scene2D/Internals/FixedPointAligner.h	Wed Mar 04 09:45:38 2020 +0100
@@ -22,6 +22,9 @@
 
 #include "../../Scene2DViewport/PredeclaredTypes.h"
 #include "../../Scene2D/ScenePoint2D.h"
+#include "../../Viewport/IViewport.h"
+
+#include <boost/weak_ptr.hpp>
 
 namespace OrthancStone
 {
@@ -32,12 +35,12 @@
     class FixedPointAligner : public boost::noncopyable
     {
     private:
-      boost::weak_ptr<ViewportController> controllerW_;
+      IViewport& viewport_;
       ScenePoint2D           pivot_;
       ScenePoint2D           canvas_;
 
     public:
-      FixedPointAligner(boost::weak_ptr<ViewportController> controllerW,
+      FixedPointAligner(IViewport& viewport,
                         const ScenePoint2D& p);
 
       void Apply();