diff Framework/Scene2DViewport/ViewportController.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 92c400a09f1b
line wrap: on
line diff
--- a/Framework/Scene2DViewport/ViewportController.cpp	Tue May 21 13:18:35 2019 +0200
+++ b/Framework/Scene2DViewport/ViewportController.cpp	Wed May 22 11:55:52 2019 +0200
@@ -130,8 +130,9 @@
   {
     ORTHANC_ASSERT(std::find(measureTools_.begin(), measureTools_.end(), measureTool)
       != measureTools_.end(), "Measure tool not found");
-    measureTools_.push_back(measureTool);
+    measureTools_.erase(
+      std::remove(measureTools_.begin(), measureTools_.end(), measureTool), 
+      measureTools_.end());
   }
-
 }