# HG changeset patch # User Sebastien Jodogne # Date 1791356546 -7200 # Node ID 0f8d09f1c245ecbce21a9157c162311914385df2 # Parent 2a9d304825845e86ecac508e5e5f799ac79bbb45 fix rendering of deleted annotations diff -r 2a9d30482584 -r 0f8d09f1c245 Applications/Samples/Common/SimpleViewerCore.cpp --- a/Applications/Samples/Common/SimpleViewerCore.cpp Tue Oct 06 22:04:34 2026 +0200 +++ b/Applications/Samples/Common/SimpleViewerCore.cpp Wed Oct 07 09:02:26 2026 +0200 @@ -143,6 +143,8 @@ annotations_->SetActiveTool(AnnotationsSceneLayer::Tool_Edit); annotations_->SetProbedLayer(0); + Register(*annotations_, &SimpleViewerCore::Handle); + { std::unique_ptr viewportLock(viewport->Lock()); viewportLock->GetController().SetUndoStack(boost::make_shared()); diff -r 2a9d30482584 -r 0f8d09f1c245 Applications/Samples/Common/SimpleViewerCore.h --- a/Applications/Samples/Common/SimpleViewerCore.h Tue Oct 06 22:04:34 2026 +0200 +++ b/Applications/Samples/Common/SimpleViewerCore.h Wed Oct 07 09:02:26 2026 +0200 @@ -56,6 +56,11 @@ virtual void Handle(const New::IObservable& observable, const DicomResourcesLoadedMessage& message) ORTHANC_OVERRIDE; + void Handle(const AnnotationsSceneLayer::AnnotationRemovedMessage& message) + { + RenderAnnotations(); + } + void RenderAnnotations(); protected: