Summary: | Equation is corrupted upon changing data file | ||
---|---|---|---|
Product: | [Applications] kst | Reporter: | Andrew Walker <arwalker> |
Component: | general | Assignee: | kst |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | 1.7.0 | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
Andrew Walker
2010-04-15 02:41:17 UTC
The problem is caused by KstObjectCollection::doRename() This function is responsible for tearing down the tag, changing the name, and then building up the newly named tag. However, the call to change the tag's name (KstObject::setTagName()), emits the signal tagChanged. This causes any equation using the tag to be reparsed, but the tag being renamed has not yet been rebuilt, so it is not found. The equation will still work, but the rebuilt text of the equation will be invalid as a result. Thus saving the session and reloading will result in an invalid equation. The solution is to emit the tagChanged signal at the correct time. An even better solution would be to hold off on reparsing any equations until all the tags had been renamed, being considerably more efficient. SVN commit 1116538 by arwalker: BUG:234403 Fix problem with timing of notification of name changes of vector to equations M +2 -0 libkst/kstmatrix.cpp M +10 -0 libkst/kstobject.cpp M +1 -0 libkst/kstobject.h M +1 -1 libkst/kstobjectcollection.h M +2 -0 libkst/kstscalar.cpp M +2 -0 libkst/kststring.cpp M +2 -0 libkst/kstvector.cpp M +0 -2 libkstmath/kstequation.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1116538 |