diff Framework/Scene2DViewport/ViewportController.h @ 893:0c5201499af8

Fixes to TrackerSampleApp following IViewport refactoring (FusionMprSdl not working yet) Removal of the useless scene_ inside ViewportController
author Benjamin Golinvaux <bgo@osimis.io>
date Mon, 15 Jul 2019 12:48:19 +0200
parents 0aff28f15ea2
children a911f5bb48da
line wrap: on
line diff
--- a/Framework/Scene2DViewport/ViewportController.h	Thu Jul 11 09:18:55 2019 +0200
+++ b/Framework/Scene2DViewport/ViewportController.h	Mon Jul 15 12:48:19 2019 +0200
@@ -181,7 +181,7 @@
 
     const Scene2D& GetScene() const
     {
-      return scene_;
+      return const_cast<IViewport&>(viewport_).GetScene();
     }
 
   private:
@@ -197,10 +197,8 @@
     
     // this is cached
     mutable double              canvasToSceneFactor_;
-
-
+    
     // Refactoring on 2019-07-10: Removing shared_ptr from scene
     IViewport&      viewport_;
-    const Scene2D&  scene_;  // As long as the viewport exists, its associated scene too   
   };
 }