comparison Framework/Scene2DViewport/MeasureCommands.cpp @ 751:712ff6ff3c19

- undo redo now works fine for both measure tool creation commands - added LayerHolder to streamline layer index management - added overloads for ORTHANC_ASSERT with no string message (some heavy preprocessor wizardry in there) - fixing wasm BasicScene is *not* finished.
author Benjamin Golinvaux <bgo@osimis.io>
date Wed, 22 May 2019 11:55:52 +0200
parents 28b9e3a54200
children e42b491f1fb2
comparison
equal deleted inserted replaced
750:284f37dc1c66 751:712ff6ff3c19
26 namespace OrthancStone 26 namespace OrthancStone
27 { 27 {
28 void CreateMeasureCommand::Undo() 28 void CreateMeasureCommand::Undo()
29 { 29 {
30 // simply disable the measure tool upon undo 30 // simply disable the measure tool upon undo
31 GetMeasureTool()->Disable();
31 GetController()->RemoveMeasureTool(GetMeasureTool()); 32 GetController()->RemoveMeasureTool(GetMeasureTool());
32 } 33 }
33 34
34 void CreateMeasureCommand::Redo() 35 void CreateMeasureCommand::Redo()
35 { 36 {
37 GetMeasureTool()->Enable();
36 GetController()->AddMeasureTool(GetMeasureTool()); 38 GetController()->AddMeasureTool(GetMeasureTool());
37 } 39 }
38 40
39 CreateMeasureCommand::CreateMeasureCommand(ViewportControllerWPtr controllerW) 41 CreateMeasureCommand::CreateMeasureCommand(ViewportControllerWPtr controllerW)
40 : TrackerCommand(controllerW) 42 : TrackerCommand(controllerW)