Mercurial > hg > orthanc-stone
comparison Framework/Scene2DViewport/MeasureTool.cpp @ 1029:0f100d0b9caf
merge
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 04 Oct 2019 21:58:30 +0200 |
parents | ac88989817e3 |
children | e713f1a99861 2d8ab34c8c91 |
comparison
equal
deleted
inserted
replaced
1028:6d5382fa45e1 | 1029:0f100d0b9caf |
---|---|
28 | 28 |
29 namespace OrthancStone | 29 namespace OrthancStone |
30 { | 30 { |
31 MeasureTool::~MeasureTool() | 31 MeasureTool::~MeasureTool() |
32 { | 32 { |
33 GetController()->Unregister(this); | 33 // if the controller is dead, let's not bother. |
34 boost::shared_ptr<ViewportController> controller = controllerW_.lock(); | |
35 if (controller) | |
36 controller->Unregister(this); | |
34 } | 37 } |
35 | 38 |
36 void MeasureTool::Enable() | 39 void MeasureTool::Enable() |
37 { | 40 { |
38 enabled_ = true; | 41 enabled_ = true; |