summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2022-01-31 20:38:22 +0000
committerCaolán McNamara <caolanm@redhat.com>2022-02-01 09:36:29 +0100
commit8a1825bf896c8004a10275d93a626e472a52966c (patch)
tree7869201c1ebab43d694085e4daa42e7db527ae02
parent9706ddb47c99e1508a1e169225e6dde7b2eb3d0d (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>
-rw-r--r--sd/source/ui/animations/CustomAnimationPane.cxx37
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