diff options
-rw-r--r-- | sd/source/ui/view/sdwindow.cxx | 4 | ||||
-rw-r--r-- | vcl/source/window/window2.cxx | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/sd/source/ui/view/sdwindow.cxx b/sd/source/ui/view/sdwindow.cxx index cfc5b3f68570..a82f8fff1a28 100644 --- a/sd/source/ui/view/sdwindow.cxx +++ b/sd/source/ui/view/sdwindow.cxx @@ -1012,7 +1012,7 @@ Selection Window::GetSurroundingTextSelection() const void Window::LogicInvalidate(const ::tools::Rectangle* pRectangle) { DrawViewShell* pDrawViewShell = dynamic_cast<DrawViewShell*>(mpViewShell); - if (pDrawViewShell && pDrawViewShell->IsInSwitchPage()) + if (!pDrawViewShell || pDrawViewShell->IsInSwitchPage()) return; OString sRectangle; @@ -1025,7 +1025,7 @@ void Window::LogicInvalidate(const ::tools::Rectangle* pRectangle) aRectangle = OutputDevice::LogicToLogic(aRectangle, MapMode(MapUnit::Map100thMM), MapMode(MapUnit::MapTwip)); sRectangle = aRectangle.toString(); } - SfxViewShell& rSfxViewShell = mpViewShell->GetViewShellBase(); + SfxViewShell& rSfxViewShell = pDrawViewShell->GetViewShellBase(); SfxLokHelper::notifyInvalidation(&rSfxViewShell, sRectangle); } diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx index 459557d438b8..096df67d2c99 100644 --- a/vcl/source/window/window2.cxx +++ b/vcl/source/window/window2.cxx @@ -1375,7 +1375,7 @@ void Window::queue_resize(StateChangedType eReason) if (VclPtr<vcl::Window> pParent = GetParentWithLOKNotifier()) { - if (GetParentDialog()) + if (!pParent->IsInInitShow()) LogicInvalidate(nullptr); } } |