diff options
author | Caolán McNamara <caolanm@redhat.com> | 2022-01-31 20:38:22 +0000 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2022-02-07 17:04:38 +0100 |
commit | bafdd5446402b81ae500902370102535bb5eb28e (patch) | |
tree | 5830ba38cfa789516e7549125b02220e2e97ff82 /sd | |
parent | 8e82d2e4d91dc999e1540f16efea5dcc81f6d21b (diff) |
Revert "tdf#145030 resync with empty selection if we unselected everything"
This reverts commit ba535d8cbda1026823ce9796c20f97b7367d581f.
Change-Id: I277e640c0f8ed0038e8ea867ddeef999a00b7b87
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129242
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129248
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/animations/CustomAnimationPane.cxx | 37 |
1 files changed, 11 insertions, 26 deletions
diff --git a/sd/source/ui/animations/CustomAnimationPane.cxx b/sd/source/ui/animations/CustomAnimationPane.cxx index 3fe62f843f15..496b7eedbb42 100644 --- a/sd/source/ui/animations/CustomAnimationPane.cxx +++ b/sd/source/ui/animations/CustomAnimationPane.cxx @@ -2446,37 +2446,22 @@ void CustomAnimationPane::onSelect() if( maSelectionLock.isLocked() ) return; - bool bHadSelection = maViewSelection.hasValue(); - bool bHasSelection = bHadSelection; + ScopeLockGuard aGuard( maSelectionLock ); + DrawViewShell* pViewShell = dynamic_cast< DrawViewShell* >( + FrameworkHelper::Instance(mrBase)->GetViewShell(FrameworkHelper::msCenterPaneURL).get()); + DrawView* pView = pViewShell ? pViewShell->GetDrawView() : nullptr; + if( pView ) { - ScopeLockGuard aGuard( maSelectionLock ); - - DrawViewShell* pViewShell = dynamic_cast< DrawViewShell* >( - FrameworkHelper::Instance(mrBase)->GetViewShell(FrameworkHelper::msCenterPaneURL).get()); - DrawView* pView = pViewShell ? pViewShell->GetDrawView() : nullptr; - - if (pView) + pView->UnmarkAllObj(); + for( const CustomAnimationEffectPtr& pEffect : maListSelection ) { - pView->UnmarkAllObj(); - bHasSelection = false; - for( const CustomAnimationEffectPtr& pEffect : maListSelection ) - { - Reference< XShape > xShape( pEffect->getTargetShape() ); - SdrObject* pObj = SdrObject::getSdrObjectFromXShape(xShape); - if (pObj) - { - pView->MarkObj(pObj, pView->GetSdrPageView()); - bHasSelection = true; - } - } + Reference< XShape > xShape( pEffect->getTargetShape() ); + SdrObject* pObj = SdrObject::getSdrObjectFromXShape(xShape); + if( pObj ) + pView->MarkObj(pObj, pView->GetSdrPageView()); } } - - // tdf#145030 if we had something selected, but ended up unselecting everything - // then now while the maSelectionLock is unlocked resync with the empty selection - if (bHadSelection != bHasSelection) - onSelectionChanged(); } // ICustomAnimationListController |