[Kst] extragear/graphics/kst/src/libkstmath
Eli Fidler
eli at staikos.net
Wed Jan 17 00:14:14 CET 2007
SVN commit 624291 by fidler:
use displayString() instead of tag() for naming curves
clean up suggested names
M +5 -4 kstdefaultnames.cpp
--- trunk/extragear/graphics/kst/src/libkstmath/kstdefaultnames.cpp #624290:624291
@@ -44,15 +44,16 @@
const QString &A, bool add_c) {
QString name;
int i=1;
+ QString cleanedField = KstObjectTag::cleanTag(field);
if (add_c) {
- name = QString("%1-%2").arg(field).arg(A);
+ name = QString("%1-%2").arg(cleanedField).arg(A);
} else {
- name = field;
+ name = cleanedField;
}
while (KST::dataObjectList.findTag(name) != KST::dataObjectList.end()) {
- name = QString("%1-%2%3").arg(field).arg(A).arg(++i);
+ name = QString("%1-%2%3").arg(cleanedField).arg(A).arg(++i);
}
return name;
@@ -66,7 +67,7 @@
/* dialogs, a curve is created from an object before the object has */
/* been put on the list */
QString KST::suggestCurveName( KstObjectTag vector_name, bool add_c ) {
- return suggestDataObjectName(vector_name.tag(),
+ return suggestDataObjectName(vector_name.displayString(),
i18n("Minimal abbreviation for 'Curve'", "C"),
add_c);
}
More information about the Kst
mailing list