[Libreoffice] [PATCH] impress: after adding a new animation, scroll down to it in the list.

Radek Doulik rodo at novell.com
Fri Jun 24 08:35:58 PDT 2011

Hi Luke,

thanks for your patch!

On Fri, 2011-06-24 at 17:38 +1200, Luke Symes wrote:
> Hi there,
> This is a one-line patch to impress to make the animation list scroll
> down to show a newly added animation. Previously we didn't scroll the
> list at all.

I think better way of doing it might be

diff --git a/sd/source/ui/animations/CustomAnimationList.cxx
index cfb8463..f7d5b2b 100644
--- a/sd/source/ui/animations/CustomAnimationList.cxx
+++ b/sd/source/ui/animations/CustomAnimationList.cxx
@@ -533,6 +533,7 @@ void
CustomAnimationList::select( CustomAnimationEffectPtr pEffect, bool
         if( pEntry->getEffect() == pEffect )
             Select( pEntry, bSelect );
+            MakeVisible( pEntry );
         pEntry = static_cast< CustomAnimationListEntry* >(Next( pEntry

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?


More information about the LibreOffice mailing list