Version: 1.4.0_devel (using KDE 3.5.6, Kubuntu (edgy) 4:3.5.6-0ubuntu1~edgy1) Compiler: Target: i486-linux-gnu OS: Linux (i686) release 2.6.17-11-generic When the tag name of a vector is changed, then everywhere it is used gets the new name (because data objects store vector pointers, not tag strings). However, this does not follow to derived scalars: if a derived scalar is used in an equation, and the parent vector's tag name is changed, then the equation quits working, rather than following the vector's new name.
Did we decide what the desired behaviour is in this case? Do we really want the derived scalar to automatically change? I'm not sure exactly how you're reproducing this bug, but if you (for instance) create a vector V and make an equation [V/Mean], then you change the vector name to V2, the equation will no longer work. If you re-parse the equation it will come out as the empty string, since it can't find it's vectors. In the case of a label, it will come out as whatever you typed originally, but will not show a value. I think it's probably tricky to make the equations/labels auto-adjust. I suppose we could check the provider of the scalar when re-parsing and use the new name if found, but that would require restructuring the KstEquation. We'd have to add methods to the label and equation parsers to update the object names without re-parsing from the original text. Is this something we really want for 1.4?
Created attachment 19962 [details] patch to fix equations
Looks good to me. On 13-Mar-07, at 2:25 PM, Eli Fidler wrote: > ------- Additional Comments From eli staikos net 2007-03-13 19:25 > ------- > Created an attachment (id=19962) > --> (http://bugs.kde.org/attachment.cgi?id=19962&action=view) > patch to fix equations > _______________________________________________ -- George Staikos KDE Developer http://www.kde.org/ Staikos Computing Services Inc. http://www.staikos.net/
Created attachment 19974 [details] patch to update labels with current object names This patch doesn't handle dependent objects, only direct references to the changed objects.
Could you just elaborate a bit more (aka give a concrete example) on the limitation wrt indirect dependents ?
If you have a vector V and you use [V/Mean] in a label, then you change V to V2, the label will not get updated. We haven't figured out the proper way to handle this case yet.
OK, that's clear... and unfortunately annoying : as vector names are unique, when a vector V is renamed to V2 there should probably not be any objects referencing the old name left behind. Is the problem conceptual (like in some cases we don't know what to do) or for the implementation ?
It adds a bit of performance impact to label rendering and I'm not excited that the render function takes some extra parameters, but it looks generally okay and you can commit it. We can clean it up for 2. -- George Staikos KDE Developer http://www.kde.org/ Staikos Computing Services Inc. http://www.staikos.net/
This has been fixed for equations by Eli... seems to work well. (note - it doesn't change the tagName of the equation... and until we come up with realtime auto tagnames, it shouldn't)
I've committed a patch (647867) which fixes dependent objects as well. Equations (and labels) should be working now.