Summary: | scalar's tag names in equations don't follow tag name changes in parent vectors | ||
---|---|---|---|
Product: | [Applications] kst | Reporter: | Netterfield <netterfield> |
Component: | general | Assignee: | kst |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | 1.x | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: |
patch to fix equations
patch to update labels with current object names |
Description
Netterfield
2007-03-06 22:34:08 UTC
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. |