changeset 635:104c379f3f1b

fix
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 09 May 2019 15:02:44 +0200
parents 6a144a45b2d8
children fb00a8be03e2
files Samples/Common/MeasureCommands.h Samples/Common/MeasureTrackers.cpp Samples/Sdl/TrackerSample.cpp
diffstat 3 files changed, 37 insertions(+), 36 deletions(-) [+]
line wrap: on
line diff
--- a/Samples/Common/MeasureCommands.h	Thu May 09 14:54:12 2019 +0200
+++ b/Samples/Common/MeasureCommands.h	Thu May 09 15:02:44 2019 +0200
@@ -71,8 +71,9 @@
   class CreateLineMeasureCommand : public CreateMeasureCommand
   {
   public:
-    CreateLineMeasureCommand::CreateLineMeasureCommand(
-      Scene2D& scene, MeasureToolList& measureTools, ScenePoint2D point);
+    CreateLineMeasureCommand(Scene2D& scene, 
+                             MeasureToolList& measureTools, 
+                             ScenePoint2D point);
     
     void Update(ScenePoint2D scenePos) ORTHANC_OVERRIDE;
 
--- a/Samples/Common/MeasureTrackers.cpp	Thu May 09 14:54:12 2019 +0200
+++ b/Samples/Common/MeasureTrackers.cpp	Thu May 09 15:02:44 2019 +0200
@@ -17,15 +17,15 @@
  * You should have received a copy of the GNU Affero General Public License
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  **/
-
-#include "MeasureTrackers.h"
+
+#include "MeasureTrackers.h"
 #include <Core/OrthancException.h>
-
-using namespace Orthanc;
-
-namespace OrthancStone
-{
-
+
+using namespace Orthanc;
+
+namespace OrthancStone
+{
+
   CreateMeasureTracker::CreateMeasureTracker(
     Scene2D&                        scene,
     std::vector<TrackerCommandPtr>& undoStack,
@@ -34,9 +34,9 @@
     , undoStack_(undoStack)
     , measureTools_(measureTools)
     , commitResult_(true)
-  {
-  }
-
+  {
+  }
+
   CreateMeasureTracker::~CreateMeasureTracker()
   {
     // if the tracker completes successfully, we add the command
@@ -55,38 +55,38 @@
     std::vector<MeasureToolPtr>&    measureTools,
     const PointerEvent&             e) 
     : CreateMeasureTracker(scene, undoStack, measureTools)
-  {
+  {
     command_.reset(
       new CreateLineMeasureCommand(
         scene,
         measureTools,
-        e.GetMainPosition().Apply(scene.GetCanvasToSceneTransform())));
-  }
-
+        e.GetMainPosition().Apply(scene.GetCanvasToSceneTransform())));
+  }
+
   CreateLineMeasureTracker::~CreateLineMeasureTracker()
   {
 
   }
 
-  void CreateMeasureTracker::Update(const PointerEvent& event)
-  {
-    ScenePoint2D scenePos = event.GetMainPosition().Apply(
-      scene_.GetCanvasToSceneTransform());
-    
+  void CreateMeasureTracker::Update(const PointerEvent& event)
+  {
+    ScenePoint2D scenePos = event.GetMainPosition().Apply(
+      scene_.GetCanvasToSceneTransform());
+    
     LOG(TRACE) << "scenePos.GetX() = " << scenePos.GetX() << "     " <<
       "scenePos.GetY() = " << scenePos.GetY();
-
+
     CreateLineMeasureTracker* concreteThis =
       dynamic_cast<CreateLineMeasureTracker*>(this);
     assert(concreteThis != NULL);
-    command_->Update(scenePos);
-  }
-
-  void CreateMeasureTracker::Release()
-  {
-    commitResult_ = false;
-  }
-
-}
-
-
+    command_->Update(scenePos);
+  }
+
+  void CreateMeasureTracker::Release()
+  {
+    commitResult_ = false;
+  }
+
+}
+
+
--- a/Samples/Sdl/TrackerSample.cpp	Thu May 09 14:54:12 2019 +0200
+++ b/Samples/Sdl/TrackerSample.cpp	Thu May 09 15:02:44 2019 +0200
@@ -132,7 +132,7 @@
     const SDL_Event& event,
     std::auto_ptr<IPointerTracker>& activeTracker);
 
-  IPointerTracker* TrackerSampleApp::TrackerHitTest(const PointerEvent& e);
+  IPointerTracker* TrackerHitTest(const PointerEvent& e);
 
   IPointerTracker* CreateSuitableTracker(
     const SDL_Event& event,
@@ -292,7 +292,7 @@
 IPointerTracker* TrackerSampleApp::TrackerHitTest(const PointerEvent& e)
 {
   // std::vector<MeasureToolPtr> measureTools_;
-  return nullptr;
+  return NULL;
 }
 
 IPointerTracker* TrackerSampleApp::CreateSuitableTracker(