diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-12-09 17:19:57 +0000 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2021-12-10 12:12:28 +0100 |
commit | 180ee81404522237c66a872cd0be718e79e00bfc (patch) | |
tree | a6331d50018dadf0c77c03f4574a3eecad7d0e52 /sw | |
parent | 20c1ab5d85e3f24d4cdf6ab167ea6ce98e2586b4 (diff) |
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/+/126590
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/uibase/docvw/AnnotationWin2.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/source/uibase/docvw/AnnotationWin2.cxx b/sw/source/uibase/docvw/AnnotationWin2.cxx index 606945672144..70460686d03d 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 ); } |