From koffice-devel Fri Oct 30 05:30:37 2009 From: Thorsten Zachmann Date: Fri, 30 Oct 2009 05:30:37 +0000 To: koffice-devel Subject: Re: review (flake) Message-Id: <200910300630.37932.t.zachmann () zagge ! de> X-MARC-Message: https://marc.info/?l=koffice-devel&m=125688071005932 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