[Kst] branches/work/kst/portto4/kst/src/plugins/fits/polynomial_unweighted

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


SVN commit 1225608 by kuemmel:

fix bug when loading labels for polynominal fits. needs review  before the release.

 M  +13 -3     fitpolynomial_unweighted.cpp  


--- branches/work/kst/portto4/kst/src/plugins/fits/polynomial_unweighted/fitpolynomial_unweighted.cpp #1225607:1225608
@@ -322,12 +322,22 @@
 
   if (ConfigWidgetFitPolynomialUnweightedPlugin* config = static_cast<ConfigWidgetFitPolynomialUnweightedPlugin*>(configWidget)) {
 
+    Kst::VectorPtr x;
+    Kst::VectorPtr y;
+    Kst::ScalarPtr order;
+
+    if (setupInputsOutputs) {
+      x = config->selectedVectorX();
+      y = config->selectedVectorY();
+      order = config->selectedScalarOrder();
+    }
+
     FitPolynomialUnweightedSource* object = store->createObject<FitPolynomialUnweightedSource>();
 
     if (setupInputsOutputs) {
-      object->setInputVector(VECTOR_IN_X, config->selectedVectorX());
-      object->setInputVector(VECTOR_IN_Y, config->selectedVectorY());
-      object->setInputScalar(SCALAR_IN, config->selectedScalarOrder());
+      object->setInputVector(VECTOR_IN_X, x);
+      object->setInputVector(VECTOR_IN_Y, y);
+      object->setInputScalar(SCALAR_IN, order);
       object->setupOutputs();
     }
 


More information about the Kst mailing list