Hi Radek, On Sat, Jun 25, 2011 at 3:35 AM, Radek Doulik <r...@novell.com> wrote: > > > At least I am not reaching the part you modified when adding custom > animation thru custom animation pane (using the add button and custom > animation dialog). If we move it to the loop, it will be reached always > when selecting an entry - the select method is called recursively when > adding new pEntry in: > > if( !pEntry && bSelect ) > { > append( pEffect ); > select( pEffect ); > } > > I wonder how do you reach that part of code?
Hmm. I think the code is incorrect here. That last if statement should really only be used if the effect wasn't in the list & needs to be added. But when I added the MakeVisible in the if statement, it made new animations be scrolled to, and I was doing it via add->custom animation dialog too. What do you think of my attached patch? Once we have found the given entry, we should select it and then we are done, aren't we? Kind regards, Luke.
From 83f1cfca5aab5ea98f703108b6f7d0baa02343ca Mon Sep 17 00:00:00 2001 From: Luke Symes <allsy...@gmail.com> Date: Sun, 26 Jun 2011 21:53:46 +1200 Subject: [PATCH] Scroll to newly added animations in the list. --- sd/source/ui/animations/CustomAnimationList.cxx | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/sd/source/ui/animations/CustomAnimationList.cxx b/sd/source/ui/animations/CustomAnimationList.cxx index cfb8463..6e6b637 100644 --- a/sd/source/ui/animations/CustomAnimationList.cxx +++ b/sd/source/ui/animations/CustomAnimationList.cxx @@ -533,7 +533,8 @@ void CustomAnimationList::select( CustomAnimationEffectPtr pEffect, bool bSelect if( pEntry->getEffect() == pEffect ) { Select( pEntry, bSelect ); - break; + MakeVisible( pEntry ); + return; } pEntry = static_cast< CustomAnimationListEntry* >(Next( pEntry )); } @@ -542,6 +543,7 @@ void CustomAnimationList::select( CustomAnimationEffectPtr pEffect, bool bSelect { append( pEffect ); select( pEffect ); + MakeVisible( Last() ); } } -- 1.7.5.4
_______________________________________________ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice