sw/source/uibase/docvw/AnnotationWin2.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 7c11589b54cfe212dfa90e5c3c29000c0c503748
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Thu Dec 9 17:19:57 2021 +0000
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Fri Dec 10 10:01:23 2021 +0100

    Resolves: tdf#146141 don't double delete comments
    
    which can happen because empty comments are deleted automatically
    on losing focus back to main document, so explicit delete of an
    empty comment resulted in a double delete
    
    Change-Id: I30390995a260235ed8702b0a088c05e91c953b3b
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126623
    Tested-by: Caolán McNamara <caol...@redhat.com>
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/sw/source/uibase/docvw/AnnotationWin2.cxx 
b/sw/source/uibase/docvw/AnnotationWin2.cxx
index 33dc2cb54b5b..6cb5511a02fa 100644
--- a/sw/source/uibase/docvw/AnnotationWin2.cxx
+++ b/sw/source/uibase/docvw/AnnotationWin2.cxx
@@ -1043,7 +1043,7 @@ void SwAnnotationWin::DeactivatePostIt()
     if ( !Application::GetSettings().GetStyleSettings().GetHighContrastMode() )
         GetOutlinerView()->SetBackgroundColor(COL_TRANSPARENT);
 
-    if ( !IsProtected() && mpOutliner->GetEditEngine().GetText().isEmpty() )
+    if (!mnEventId && !IsProtected() && 
mpOutliner->GetEditEngine().GetText().isEmpty())
     {
         mnEventId = Application::PostUserEvent( LINK( this, SwAnnotationWin, 
DeleteHdl), nullptr, true );
     }

Reply via email to