[Kst] branches/work/kst/hierarchy/kst/src/libkstapp
Eli Fidler
eli at staikos.net
Sat Dec 16 00:13:04 CET 2006
SVN commit 613993 by fidler:
fix tags for orphans
must setTagName before creating dependent objects
M +4 -2 kstfilterdialog_i.cpp
M +7 -4 kstfitdialog_i.cpp
--- branches/work/kst/hierarchy/kst/src/libkstapp/kstfilterdialog_i.cpp #613992:613993
@@ -141,7 +141,8 @@
KstStringPtr s = *KST::stringList.findTag(ss->selectedString());
if (s == *KST::stringList.end()) {
QString val = ss->_string->currentText();
- KstStringPtr newString = new KstString(KstObjectTag(ss->_string->currentText(), KstObjectTag::globalTagContext), 0L, val, true); // FIXME: do tag context properly
+ // create orphan string
+ KstStringPtr newString = new KstString(KstObjectTag(ss->_string->currentText(), KstObjectTag::orphanTagContext), 0L, val, true);
plugin->inputStrings().insert((*it)._name, newString);
} else {
plugin->inputStrings().insert((*it)._name, s);
@@ -159,7 +160,8 @@
double val = ss->_scalar->currentText().toDouble(&ok);
if (ok) {
- KstScalarPtr newScalar = new KstScalar(KstObjectTag(ss->_scalar->currentText(), KstObjectTag::globalTagContext), 0L, val, true, false); // FIXME: do tag context properly
+ // create orphan scalar
+ KstScalarPtr newScalar = new KstScalar(KstObjectTag(ss->_scalar->currentText(), KstObjectTag::orphanTagContext), 0L, val, true, false);
plugin->inputScalars().insert((*it)._name, newScalar);
} else {
plugin->inputScalars().insert((*it)._name, s);
--- branches/work/kst/hierarchy/kst/src/libkstapp/kstfitdialog_i.cpp #613992:613993
@@ -197,13 +197,14 @@
plugin->writeLock();
plugin->setDirty();
if (saveInputs(plugin, pPtr)) {
- plugin->setPlugin(pPtr);
-
if (tagName == plugin_defaultTag) {
tagName = KST::suggestPluginName(_pluginList[pitem], KstObjectTag::fromString(_strCurve));
}
plugin->setTagName(KstObjectTag(tagName, KstObjectTag::globalTagContext)); // FIXME: tag context always global?
+
+ plugin->setPlugin(pPtr);
+
if (saveOutputs(plugin, pPtr)) {
if (plugin->isValid()) {
if (!createCurve(plugin)) {
@@ -397,7 +398,8 @@
KstStringPtr s = *KST::stringList.findTag(ss->selectedString());
if (s == *KST::stringList.end()) {
QString val = ss->_string->currentText();
- KstStringPtr newString = new KstString(KstObjectTag(ss->_string->currentText(), plugin->tag()), 0L, val, true);
+ // create orphan string
+ KstStringPtr newString = new KstString(KstObjectTag(ss->_string->currentText(), KstObjectTag::orphanTagContext), 0L, val, true);
plugin->inputStrings().insert((*it)._name, newString);
} else {
plugin->inputStrings().insert((*it)._name, s);
@@ -415,7 +417,8 @@
double val = ss->_scalar->currentText().toDouble(&ok);
if (ok) {
- KstScalarPtr newScalar = new KstScalar(KstObjectTag(ss->_scalar->currentText(), plugin->tag()), 0L, val, true, false);
+ // create orphan scalar
+ KstScalarPtr newScalar = new KstScalar(KstObjectTag(ss->_scalar->currentText(), KstObjectTag::orphanTagContext), 0L, val, true, false);
plugin->inputScalars().insert((*it)._name, newScalar);
} else {
plugin->inputScalars().insert((*it)._name, s);
More information about the Kst
mailing list