diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-10-11 15:39:37 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-10-11 20:44:29 +0200 |
commit | 759dcc107cb7740ec4242634a19631d9ed70cb0f (patch) | |
tree | d09a57d81a5d546c674829748e624603cb92b39d | |
parent | 3bc8e2f3ab69adb9196508688e5211dc171add95 (diff) |
Resolves: tdf#120487 postit losing focus triggering recreation of postit
Change-Id: Idde6b740bc94de62bbd528b656841ab37e3f3786
Reviewed-on: https://gerrit.libreoffice.org/61681
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | sw/source/uibase/docvw/PostItMgr.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sw/source/uibase/docvw/PostItMgr.cxx b/sw/source/uibase/docvw/PostItMgr.cxx index 0a04f222a4c1..1d778cc4910c 100644 --- a/sw/source/uibase/docvw/PostItMgr.cxx +++ b/sw/source/uibase/docvw/PostItMgr.cxx @@ -306,8 +306,11 @@ void SwPostItMgr::RemoveItem( SfxBroadcaster* pBroadcast ) SwSidebarItem* p = (*i); if (GetActiveSidebarWin() == p->pPostIt) SetActiveSidebarWin(nullptr); - p->pPostIt.disposeAndClear(); + // tdf#120487 remove from list before dispose, so comment window + // won't be recreated due to the entry still in the list if focus + // transferring from the pPostIt triggers relayout of postits mvPostItFields.erase(i); + p->pPostIt.disposeAndClear(); delete p; break; } |