Mercurial > hg > orthanc-stone
comparison OrthancStone/Sources/Scene2DViewport/ViewportController.cpp @ 1606:874e178f34e9
- ViewportController now has weak ptr to Viewport
- Measuring tools + related commands and all trackers now store only a weak_ptr to the Viewport and lock() on demand for usage
- LayerHolder and FixedPoint aligner store only a weak_ptr to the Viewport, too
- Fixed float/double warning in GrayscaleWindowingSceneTracker
author | Benjamin Golinvaux <bgo@osimis.io> |
---|---|
date | Wed, 28 Oct 2020 20:14:34 +0100 |
parents | 8563ea5d8ae4 |
children | 52b8b96cb55f |
comparison
equal
deleted
inserted
replaced
1605:b3c439d96d3e | 1606:874e178f34e9 |
---|---|
27 | 27 |
28 #include <boost/make_shared.hpp> | 28 #include <boost/make_shared.hpp> |
29 | 29 |
30 namespace OrthancStone | 30 namespace OrthancStone |
31 { | 31 { |
32 ViewportController::ViewportController(boost::shared_ptr<IViewport> viewport) | 32 ViewportController::ViewportController(boost::weak_ptr<IViewport> viewport) |
33 : viewport_(viewport) | 33 : viewport_(viewport) |
34 , scene_(new Scene2D) | 34 , scene_(new Scene2D) |
35 , canvasToSceneFactor_(1) | 35 , canvasToSceneFactor_(1) |
36 { | 36 { |
37 // undoStack_ is not default-initialized, which basically means empty. | 37 // undoStack_ is not default-initialized, which basically means empty. |