Mercurial > hg > orthanc-stone
changeset 1794:fe5c7311a7fd
fix for msvc 2008
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 17 May 2021 18:03:47 +0200 |
parents | c5e6379b9cd0 |
children | 39673d351ef2 |
files | OrthancStone/Sources/Scene2DViewport/AngleMeasureTool.cpp OrthancStone/Sources/Scene2DViewport/LineMeasureTool.cpp |
diffstat | 2 files changed, 26 insertions(+), 18 deletions(-) [+] |
line wrap: on
line diff
--- a/OrthancStone/Sources/Scene2DViewport/AngleMeasureTool.cpp Mon May 17 17:23:54 2021 +0200 +++ b/OrthancStone/Sources/Scene2DViewport/AngleMeasureTool.cpp Mon May 17 18:03:47 2021 +0200 @@ -207,19 +207,23 @@ scene.GetCanvasToSceneTransform()); if (!HitTest(scenePos)) - return boost::shared_ptr<IFlexiblePointerTracker>(); + { + return boost::shared_ptr<IFlexiblePointerTracker>(); // NULL + } + else + { + /** + new EditLineMeasureTracker( + boost::shared_ptr<LineMeasureTool> measureTool; + MessageBroker & broker, + boost::weak_ptr<IViewport> viewport, + const PointerEvent & e); + */ - /** - new EditLineMeasureTracker( - boost::shared_ptr<LineMeasureTool> measureTool; - MessageBroker & broker, - boost::weak_ptr<IViewport> viewport, - const PointerEvent & e); - */ - - boost::shared_ptr<EditAngleMeasureTracker> editAngleMeasureTracker( - new EditAngleMeasureTracker(shared_from_this(), viewport_, e)); - return editAngleMeasureTracker; + boost::shared_ptr<EditAngleMeasureTracker> editAngleMeasureTracker( + new EditAngleMeasureTracker(shared_from_this(), viewport_, e)); + return editAngleMeasureTracker; + } } void AngleMeasureTool::SetCenter(ScenePoint2D pt)
--- a/OrthancStone/Sources/Scene2DViewport/LineMeasureTool.cpp Mon May 17 17:23:54 2021 +0200 +++ b/OrthancStone/Sources/Scene2DViewport/LineMeasureTool.cpp Mon May 17 18:03:47 2021 +0200 @@ -166,15 +166,19 @@ scene.GetCanvasToSceneTransform()); if (!HitTest(scenePos)) - return boost::shared_ptr<IFlexiblePointerTracker>(); - - boost::shared_ptr<EditLineMeasureTracker> editLineMeasureTracker( - new EditLineMeasureTracker(shared_from_this(), viewport_, e)); - return editLineMeasureTracker; + { + return boost::shared_ptr<IFlexiblePointerTracker>(); // NULL + } + else + { + boost::shared_ptr<EditLineMeasureTracker> editLineMeasureTracker( + new EditLineMeasureTracker(shared_from_this(), viewport_, e)); + return editLineMeasureTracker; + } } else { - return NULL; + return boost::shared_ptr<IFlexiblePointerTracker>(); // NULL } }