From 786cc8a5a3cd34329c72b867e5fd7896b10a7351 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Tue, 13 Sep 2016 10:06:52 +0200 Subject: sw: emit LOK_CALLBACK_GRAPHIC_VIEW_SELECTION as part of registerCallback() Have a Writer shape selection in the first view, create a new view, the second view doesn't see the selection. But the same works if the shape selection is created when the second view was created earlier. Emit the svx selection state as part of SwCursorShell::NotifyCursor() to fix the problem, but take care of not sending the status to the new view itself. Change-Id: Iff3979235e1c12cc64867c3184354967f451370b Reviewed-on: https://gerrit.libreoffice.org/28857 Reviewed-by: Miklos Vajna Tested-by: Jenkins --- svx/source/svdraw/svdmrkv.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'svx') diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx index eb14f29fc25c..402c61e4d40f 100644 --- a/svx/source/svdraw/svdmrkv.cxx +++ b/svx/source/svdraw/svdmrkv.cxx @@ -767,9 +767,12 @@ void SdrMarkView::SetMarkHandles(SfxViewShell* pOtherShell) if(SfxViewShell* pViewShell = GetSfxViewShell()) { if (pOtherShell) + { // An other shell wants to know about our existing // selection. - SfxLokHelper::notifyOtherView(pViewShell, pOtherShell, LOK_CALLBACK_GRAPHIC_VIEW_SELECTION, "selection", sSelection); + if (pViewShell != pOtherShell) + SfxLokHelper::notifyOtherView(pViewShell, pOtherShell, LOK_CALLBACK_GRAPHIC_VIEW_SELECTION, "selection", sSelection); + } else { // We have a new selection, so both pViewShell and the -- cgit v1.2.3