[Kst] kdeextragear-2/kst/kst

George Staikos staikos at kde.org
Tue Sep 21 18:12:37 CEST 2004


CVS commit by staikos: 

Only save data sources that are in use in the Kst file
CCMAIL: 89889-done at bugs.kde.org


  M +11 -4     kstdoc.cpp   1.119


--- kdeextragear-2/kst/kst/kstdoc.cpp  #1.118:1.119
@@ -401,10 +401,18 @@ void KstDoc::saveDocument(QTextStream& t
   ts << " <updateDelay>" << delay() << "</updateDelay>" << endl;
 
+  KstRVectorList rvl = kstObjectSubList<KstVector,KstRVector>(KST::vectorList);
+
   // save files
   KST::dataSourceList.lock().readLock();
   for (uint i = 0; i < KST::dataSourceList.count(); i++) {
+    KstDataSourcePtr dsp = KST::dataSourceList[i];
+    for (KstRVectorList::Iterator it = rvl.begin(); it != rvl.end(); ++it) {
+      if ((*it)->dataSource() == dsp) {
     ts << " <kstfile>" << endl;
-    KST::dataSourceList[i]->save(ts);
+        dsp->save(ts);
     ts << " </kstfile>" << endl;
+        break;
+      }
+    }
   }
   KST::dataSourceList.lock().readUnlock();
@@ -420,5 +428,4 @@ void KstDoc::saveDocument(QTextStream& t
 
   // save vectors
-  KstRVectorList rvl = kstObjectSubList<KstVector,KstRVector>(KST::vectorList);
   for (KstRVectorList::Iterator it = rvl.begin(); it != rvl.end(); ++it) {
     ts << " <vector>" << endl;





More information about the Kst mailing list