[Kst] Re: branches/work/kst/portto4/kst/src/libkstapp

Peter Kümmel syntheticpp at gmx.net
Tue Mar 22 02:26:03 CET 2011


On 21.03.2011 22:49, Peter Kümmel wrote:
> On 21.03.2011 21:54, Nicolas Brisset wrote:
>>> What about this patch for (b) ? We don't have to touch any plugin
>>> code.
>>>
>>> Seems to work with the polynominal fit.
>> Yes, I confirm that the curves get loaded correctly. However labels are broken (I guess that's what you meant by polynomials).
>
> After loading the label uses X71, X72, and X73, but the label dialog shows x^0==X70, X71, and X72

The problem is:

     <variables>
         <datavector>
         <scalar initialXNum="25"/>
     </variables>
     <objects>
         <plugin type="Polynomial Fit" initialVNum="3" initialXNum="25" initialPNum="1">
             <inputscalar type="Order Scalar" tag="2 (X25)"/>
             <outputvector type="Fit" tag="Fit"/>
         </plugin>
     </objects>


In <variables> 25 scalars are created named X0...X25.

In <plugin> it loads (X25) because it could find the existing scalar and _xnum is still 25,
then the output vectors are created with scalars starting at 25 so we have two X25.
When I manually change initialXNum="25" in <plugin> to 26 loading works.

But I'm not sure how to fix this.
I've committed a fix (it increments _xnum before the plugin stores it).

But I hope there is a more generic solution. This bug looks like a principle problem.

Peter




More information about the Kst mailing list