Mercurial > hg > orthanc-stone
comparison Framework/Viewport/WebAssemblyViewport.cpp @ 1307:8a28a9bf8876 broker
ViewportController now gets a ref to its parent viewport for proper lock usage
author | Benjamin Golinvaux <bgo@osimis.io> |
---|---|
date | Wed, 04 Mar 2020 10:07:37 +0100 |
parents | 7ec8fea061b9 |
children | adf234ecaa00 |
comparison
equal
deleted
inserted
replaced
1306:fef1ec42a7db | 1307:8a28a9bf8876 |
---|---|
211 fullCanvasId_("#" + canvasId), | 211 fullCanvasId_("#" + canvasId), |
212 interactor_(new DefaultViewportInteractor) | 212 interactor_(new DefaultViewportInteractor) |
213 { | 213 { |
214 if (scene == NULL) | 214 if (scene == NULL) |
215 { | 215 { |
216 controller_ = boost::make_shared<ViewportController>(); | 216 controller_ = boost::make_shared<ViewportController>(*this); |
217 } | 217 } |
218 else | 218 else |
219 { | 219 { |
220 controller_ = boost::make_shared<ViewportController>(*scene); | 220 controller_ = boost::make_shared<ViewportController>(*this,*scene); |
221 } | 221 } |
222 | 222 |
223 LOG(INFO) << "Initializing Stone viewport on HTML canvas: " << canvasId; | 223 LOG(INFO) << "Initializing Stone viewport on HTML canvas: " << canvasId; |
224 | 224 |
225 if (canvasId.empty() || | 225 if (canvasId.empty() || |