[Kst] kdeextragear-2/kst/kst
Andrew Walker
arwalker at sumusltd.com
Mon Dec 13 20:27:53 CET 2004
CVS commit by arwalker:
Check that the desiganted vector name is not already in use, and if it is then try a new name.
The previous approach was too simplistic as it assumed that the vector name was never already in use.
M +9 -2 datawizard.ui.h 1.101
--- kdeextragear-2/kst/kst/datawizard.ui.h #1.100:1.101
@@ -475,8 +475,15 @@ void DataWizard::finished()
{
QListViewItemIterator it(_vectors);
+ int vectorCount;
+
while (it.current()) {
QCheckListItem *i = static_cast<QCheckListItem*>(it.current());
if (i->isOn()) {
- name = QString("V%1-%2").arg(KST::vectorList.count()).arg(it.current()->text(0));
+ vectorCount = KST::vectorList.count();
+ name = QString("V%1-%2").arg(vectorCount).arg(it.current()->text(0));
+ while (KST::vectorTagNameNotUnique(name, false)) {
+ name = QString("V%1-%2").arg(vectorCount).arg(it.current()->text(0));
+ vectorCount++;
+ }
KstVectorPtr v = new KstRVector(ds, it.current()->text(0), name,
_kstDataRange->CountFromEnd->isChecked() ? -1 : _kstDataRange->F0->value(),
More information about the Kst
mailing list