[prev in list] [next in list] [prev in thread] [next in thread] 

List:       koffice-devel
Subject:    Re: review (flake)
From:       Thorsten Zachmann <t.zachmann () zagge ! de>
Date:       2009-10-30 5:30:37
Message-ID: 200910300630.37932.t.zachmann () zagge ! de
[Download RAW message or body]

On Thu October 29 2009, Thomas Zander wrote:
> could someone please review r1042478 for backporting?
> 
> On add/remove shape make sure we do collision detection
>     BUG:185342
> 

>  void KoShapeManager::addAdditional(KoShape *shape)
> @@ -218,6 +219,8 @@
> 
>  void KoShapeManager::remove(KoShape *shape)
>  {
> +    notifyShapeChanged(shape);
> +    d->updateTree();

This does do some unnecessary stuff like adding removing the the shape from 
the tree, and does the shape collision detection twice which is not needed 
when removing a shape. 
How about not calling updateTree but instead a function that does one shape 
collision detection when a shape is removed? This will also avoid calling 
update tree for every shape removed which is wrong as updateTree is specially 
there to handle aggregated updates of shapes which is circumvented by the 
patch.

>      shape->update();
>      shape->removeShapeManager(this);
>      d->selection->deselect(shape);
> 

Thorsten
_______________________________________________
koffice-devel mailing list
koffice-devel@kde.org
https://mail.kde.org/mailman/listinfo/koffice-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic