Mercurial > hg > orthanc-stone
diff Framework/Scene2DViewport/OneGesturePointerTracker.cpp @ 1305:a5326ce4f24b broker
Trackers and measuring tools now use the viewport instead of ViewportController, so that proper locks can be used
author | Benjamin Golinvaux <bgo@osimis.io> |
---|---|
date | Wed, 04 Mar 2020 09:45:38 +0100 |
parents | 7ec8fea061b9 |
children | ab81ee8fce1f |
line wrap: on
line diff
--- a/Framework/Scene2DViewport/OneGesturePointerTracker.cpp Wed Mar 04 09:44:34 2020 +0100 +++ b/Framework/Scene2DViewport/OneGesturePointerTracker.cpp Wed Mar 04 09:45:38 2020 +0100 @@ -28,8 +28,8 @@ namespace OrthancStone { OneGesturePointerTracker::OneGesturePointerTracker( - boost::weak_ptr<ViewportController> controllerW) - : controllerW_(controllerW) + IViewport& viewport) + : viewport_(viewport) , alive_(true) , currentTouchCount_(1) { @@ -60,7 +60,7 @@ * 2019-12-06 (SJO): Patch to have consistent behavior when mouse * leaves the canvas while the tracker is still active, then * button is released while out-of-canvas. Such an event is not - * catched (at least in WebAssembly), so we delete the tracker on + * caught (at least in WebAssembly), so we delete the tracker on * the next click inside the canvas. **/ alive_ = false; @@ -70,9 +70,4 @@ { return alive_; } - - boost::shared_ptr<ViewportController> OneGesturePointerTracker::GetController() - { - return controllerW_.lock(); - } }