[Kst] extragear/graphics/kst/kst
Barth Netterfield
netterfield at astro.utoronto.ca
Tue Aug 30 03:40:12 CEST 2005
SVN commit 454834 by netterfield:
Matrixes are not data objects: search the matrixList for
name clashes, not the data object list.
M +14 -3 kstdefaultnames.cpp
--- trunk/extragear/graphics/kst/kst/kstdefaultnames.cpp #454833:454834
@@ -117,9 +117,20 @@
}
QString KST::suggestMatrixName(const QString& vector_name) {
- return suggestDataObjectName(vector_name,
- i18n("Minimal abbreviation for 'Matrix'", "M"),
- true);
+
+ QString name, field;
+ int i=1;
+
+ field = vector_name;
+
+
+ name = field;
+
+ while (KST::matrixList.findTag(name) != KST::matrixList.end()) {
+ name = QString("%1-%2").arg(field).arg(++i);
+ }
+
+ return name;
}
QString KST::suggestImageName(const QString& matrix_name) {
More information about the Kst
mailing list