sd/source/ui/annotations/annotationmanager.cxx |    2 ++
 1 file changed, 2 insertions(+)

New commits:
commit a178959cb68360f05ce625a6aaf698aa657f82fc
Author:     Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk>
AuthorDate: Fri Jan 3 10:31:13 2025 +0900
Commit:     Ilmari Lauhakangas <ilmari.lauhakan...@libreoffice.org>
CommitDate: Fri Jan 3 12:12:45 2025 +0100

    tdf#162920 make show/hide comments working again
    
    use SdrObject::SetVisible to change the annotation's visibility
    status.
    
    Change-Id: I8002294351c64830ad294c43f6ee92425456ac0d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179661
    Reviewed-by: Tomaž Vajngerl <qui...@gmail.com>
    Tested-by: Jenkins
    (cherry picked from commit 9e1e48d73014471ebc2ea4f3589276cace096613)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179695
    Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakan...@libreoffice.org>

diff --git a/sd/source/ui/annotations/annotationmanager.cxx 
b/sd/source/ui/annotations/annotationmanager.cxx
index e3743c97ca42..9d22ed38d735 100644
--- a/sd/source/ui/annotations/annotationmanager.cxx
+++ b/sd/source/ui/annotations/annotationmanager.cxx
@@ -1011,6 +1011,7 @@ void AnnotationManagerImpl::SyncAnnotationObjects()
         if (pObject)
         {
             nIndex++;
+            pObject->SetVisible(mbShowAnnotations);
             continue;
         }
 
@@ -1116,6 +1117,7 @@ void AnnotationManagerImpl::SyncAnnotationObjects()
         }
 
         pNewObject->SetRelativePos(aRectangle.TopLeft());
+        pNewObject->SetVisible(mbShowAnnotations);
 
         pView->InsertObjectAtView(pNewObject.get(), *pView->GetSdrPageView());
 

Reply via email to