summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-10-11 15:39:37 +0100
committerCaolán McNamara <caolanm@redhat.com>2018-10-19 10:33:43 +0200
commita4257d576cb77753979aae14a9c1751d14d6e375 (patch)
tree15226248c0006d2ad895dcf514362924bbc7100e
parentf1bb56cce9bd0ced204e417049d4f1be266638b5 (diff)
Resolves: tdf#120487 postit losing focus triggering recreation of postit
Change-Id: Idde6b740bc94de62bbd528b656841ab37e3f3786 Reviewed-on: https://gerrit.libreoffice.org/61682 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com> (cherry picked from commit f1e09253316d9db39b7adab6d31e759c09de3406) Reviewed-on: https://gerrit.libreoffice.org/61786 Tested-by: Xisco Faulí <xiscofauli@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--sw/source/uibase/docvw/PostItMgr.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/sw/source/uibase/docvw/PostItMgr.cxx b/sw/source/uibase/docvw/PostItMgr.cxx
index 2cd8d420db70..4565d4843ac7 100644
--- a/sw/source/uibase/docvw/PostItMgr.cxx
+++ b/sw/source/uibase/docvw/PostItMgr.cxx
@@ -309,8 +309,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;
}