# HG changeset patch # User Sebastien Jodogne # Date 1496050973 -7200 # Node ID 961ee171d933ba1c4ab46fe07960d736938cd4bd # Parent 81f73efd81a1202c57182549bd10fe13433a47c6 cleaning up diff -r 81f73efd81a1 -r 961ee171d933 Applications/Samples/SingleFrameApplication.h --- a/Applications/Samples/SingleFrameApplication.h Mon May 29 11:18:35 2017 +0200 +++ b/Applications/Samples/SingleFrameApplication.h Mon May 29 11:42:53 2017 +0200 @@ -94,6 +94,10 @@ virtual void NotifyGeometryReady(const ILayerSource& source) { + // Once the geometry of the series is downloaded from Orthanc, + // display its first slice, and adapt the viewport to fit this + // slice + const OrthancFrameLayerSource& frame = dynamic_cast(source); diff -r 81f73efd81a1 -r 961ee171d933 Framework/Widgets/LayerWidget.cpp --- a/Framework/Widgets/LayerWidget.cpp Mon May 29 11:18:35 2017 +0200 +++ b/Framework/Widgets/LayerWidget.cpp Mon May 29 11:42:53 2017 +0200 @@ -393,7 +393,7 @@ slice_ = slice; ResetPendingScene(); - InvalidateAllLayers(); + InvalidateAllLayers(); // TODO Removing this line avoid loading twice the image in WASM } } diff -r 81f73efd81a1 -r 961ee171d933 Framework/Widgets/LayeredSceneWidget.cpp --- a/Framework/Widgets/LayeredSceneWidget.cpp Mon May 29 11:18:35 2017 +0200 +++ b/Framework/Widgets/LayeredSceneWidget.cpp Mon May 29 11:42:53 2017 +0200 @@ -535,23 +535,6 @@ - struct LayeredSceneWidget::SliceChangeFunctor - { - const SliceGeometry& slice_; - - SliceChangeFunctor(const SliceGeometry& slice) : - slice_(slice) - { - } - - void operator() (ISliceObserver& observer, - const LayeredSceneWidget& source) - { - observer.NotifySliceChange(source, slice_); - } - }; - - void LayeredSceneWidget::SetSlice(const SliceGeometry& slice) { { @@ -561,8 +544,7 @@ InvalidateAllLayers(); - SliceChangeFunctor functor(slice); - observers_.Notify(*this, functor); + observers_.Apply(*this, &ISliceObserver::NotifySliceChange, slice); } diff -r 81f73efd81a1 -r 961ee171d933 Framework/Widgets/LayeredSceneWidget.h --- a/Framework/Widgets/LayeredSceneWidget.h Mon May 29 11:18:35 2017 +0200 +++ b/Framework/Widgets/LayeredSceneWidget.h Mon May 29 11:42:53 2017 +0200 @@ -45,7 +45,6 @@ }; private: - struct SliceChangeFunctor; class Renderers; class PendingLayers; class Layer; diff -r 81f73efd81a1 -r 961ee171d933 Framework/Widgets/WorldSceneWidget.h --- a/Framework/Widgets/WorldSceneWidget.h Mon May 29 11:18:35 2017 +0200 +++ b/Framework/Widgets/WorldSceneWidget.h Mon May 29 11:42:53 2017 +0200 @@ -47,7 +47,6 @@ }; private: - struct ViewChangeFunctor; struct SizeChangeFunctor; class SceneMouseTracker;