[Kst] extragear/graphics/kst/kst
George Staikos
staikos at kde.org
Thu Nov 17 15:33:11 CET 2005
SVN commit 481020 by staikos:
some cleanup related to 116488
M +11 -11 kstplugin.cpp
M +2 -1 kstplugin.h
--- trunk/extragear/graphics/kst/kst/kstplugin.cpp #481019:481020
@@ -617,23 +617,23 @@
}
+// FIXME: KstPlugin should not know about fit scalars!!
void KstPlugin::createFitScalars() {
if (_plugin->data()._isFit && _outputVectors.contains("Parameters")) {
KstVectorPtr vectorParam = _outputVectors["Parameters"];
if (vectorParam) {
QString paramName;
- int i;
- for (i = 0, paramName = _plugin->parameterName(i); !paramName.isEmpty(); paramName = _plugin->parameterName(++i)) {
- if (!paramName.isEmpty()) {
+ int i = 0;
+ for (paramName = _plugin->parameterName(i); !paramName.isEmpty(); paramName = _plugin->parameterName(++i)) {
+ double scalarValue = vectorParam->value(i);
+ if (!_outputScalars.contains(paramName)) {
QString scalarName = i18n("%1-%2").arg(tagName()).arg(paramName);
- double scalarValue = vectorParam->value(i);
- if (!_outputScalars.contains(paramName)) {
- KstScalarPtr s = new KstScalar(scalarName);
- s->writeLock();
- s->setProvider(this);
- s->writeUnlock();
- _outputScalars.insert(paramName, s);
- }
+ KstScalarPtr s = new KstScalar(scalarName, scalarValue);
+ s->writeUnlock();
+ s->setProvider(this);
+ s->writeLock();
+ _outputScalars.insert(paramName, s);
+ } else {
_outputScalars[paramName]->setValue(scalarValue);
}
}
--- trunk/extragear/graphics/kst/kst/kstplugin.h #481019:481020
@@ -50,8 +50,9 @@
QString lastError() const;
+ // FIXME: remove this
void createFitScalars();
-
+
virtual KstDataObjectPtr makeDuplicate(KstDataObjectDataObjectMap& duplicatedMap);
protected:
More information about the Kst
mailing list