Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


Hi Radek,

On Sat, Jun 25, 2011 at 3:35 AM, Radek Doulik <rodo@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 <allsymes@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


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.