Mercurial > hg > orthanc-stone
diff Framework/Scene2DViewport/MeasureCommands.h @ 722:28b9e3a54200
Undo mechanism implemented (not connected to UI yet). Undo stack and measuring
tools are now handled by the ViewportController. Multi-touch does not crash
trackers anymore.
author | Benjamin Golinvaux <bgo@osimis.io> |
---|---|
date | Tue, 21 May 2019 10:27:54 +0200 |
parents | 059e1fd05fd6 |
children | c0fcb2757b0a |
line wrap: on
line diff
--- a/Framework/Scene2DViewport/MeasureCommands.h Mon May 20 12:49:29 2019 +0200 +++ b/Framework/Scene2DViewport/MeasureCommands.h Tue May 21 10:27:54 2019 +0200 @@ -43,19 +43,17 @@ virtual void Redo() = 0; protected: + ViewportControllerPtr GetController(); ViewportControllerWPtr controllerW_; }; class CreateMeasureCommand : public TrackerCommand { public: - CreateMeasureCommand( - ViewportControllerWPtr controllerW, MeasureToolList& measureTools); + CreateMeasureCommand(ViewportControllerWPtr controllerW); ~CreateMeasureCommand(); virtual void Undo() ORTHANC_OVERRIDE; virtual void Redo() ORTHANC_OVERRIDE; - protected: - MeasureToolList& measureTools_; private: /** Must be implemented by the subclasses that create the actual tool */ virtual MeasureToolPtr GetMeasureTool() = 0; @@ -67,7 +65,6 @@ CreateLineMeasureCommand( MessageBroker& broker, ViewportControllerWPtr controllerW, - MeasureToolList& measureTools, ScenePoint2D point); // the starting position is set in the ctor @@ -89,7 +86,6 @@ CreateAngleMeasureCommand( MessageBroker& broker, ViewportControllerWPtr controllerW, - MeasureToolList& measureTools, ScenePoint2D point); /** This method sets center*/