diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-06-30 17:21:10 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-06-30 18:04:18 +0200 |
commit | a2c4bed594013ed9d671197cde53990fcede395d (patch) | |
tree | 0c589bde42bc31b9d028c65718a26d4a0b0d6450 | |
parent | 1cf7e272f7731978695f4bcd8fbdf85766d4f14e (diff) |
sw redercontext: fix missing draw of the overlay
With this, if e.g. Ctrl-A is hit for a hello-world document, then
selection is properly visible.
Change-Id: If3fae1e73dc76c50e62f6e1f31d99873636f0e93
-rw-r--r-- | sw/source/core/view/viewsh.cxx | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx index f3b912175af9..ad014b5d4a87 100644 --- a/sw/source/core/view/viewsh.cxx +++ b/sw/source/core/view/viewsh.cxx @@ -78,6 +78,7 @@ #include <vcl/virdev.hxx> #include <vcl/svapp.hxx> #include <svx/sdrpaintwindow.hxx> +#include <svx/sdr/overlay/overlaymanager.hxx> #include <LibreOfficeKit/LibreOfficeKitEnums.h> #if !HAVE_FEATURE_DESKTOP @@ -1685,7 +1686,19 @@ public: ~RenderContextGuard() { if (m_pRef != m_pShell->GetWin() && m_pShell->Imp()->GetDrawView()) + { + // Need to explicitly draw the overlay on m_pRef, since by default + // they would be only drawn for m_pOriginalValue. + SdrPaintWindow* pOldPaintWindow = m_pShell->Imp()->GetDrawView()->GetPaintWindow(0); + rtl::Reference<sdr::overlay::OverlayManager> xOldManager = pOldPaintWindow->GetOverlayManager(); + if (xOldManager.is()) + { + SdrPaintWindow* pNewPaintWindow = m_pShell->Imp()->GetDrawView()->FindPaintWindow(*m_pRef); + xOldManager->completeRedraw(pNewPaintWindow->GetRedrawRegion(), m_pRef); + } + m_pShell->Imp()->GetDrawView()->DeleteWindowFromPaintView(m_pRef); + } m_pRef = m_pOriginalValue; } }; |