From 5a7157d319477830426797532e02ac39d3b859f4 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 15 Apr 2024 11:29:03 +0200 Subject: Merging upstream version 4:24.2.1. Signed-off-by: Daniel Baumann --- svx/source/svdraw/svdpntv.cxx | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) (limited to 'svx/source/svdraw/svdpntv.cxx') diff --git a/svx/source/svdraw/svdpntv.cxx b/svx/source/svdraw/svdpntv.cxx index 4584e7f831..f092887250 100644 --- a/svx/source/svdraw/svdpntv.cxx +++ b/svx/source/svdraw/svdpntv.cxx @@ -414,22 +414,15 @@ void SdrPaintView::DeleteDeviceFromPaintView(OutputDevice& rOldDev) void SdrPaintView::SetLayerVisible(const OUString& rName, bool bShow) { - if(mpPageView) - { - mpPageView->SetLayerVisible(rName, bShow); - } - + const bool bChanged = mpPageView && mpPageView->SetLayerVisible(rName, bShow); + if (!bChanged) + return; InvalidateAllWin(); } bool SdrPaintView::IsLayerVisible(const OUString& rName) const { - if(mpPageView) - { - return mpPageView->IsLayerVisible(rName); - } - - return false; + return mpPageView && mpPageView->IsLayerVisible(rName); } void SdrPaintView::SetLayerLocked(const OUString& rName, bool bLock) -- cgit v1.2.3