[Kst] extragear/graphics/kst/kst
Andrew Walker
arwalker at sumusltd.com
Thu Sep 29 23:49:13 CEST 2005
SVN commit 465477 by arwalker:
BUG:111570 The change data file dialog will only contain that files that are actually in use, whereas previously it showed all files.
M +8 -4 kstchangefiledialog_i.cpp
--- trunk/extragear/graphics/kst/kst/kstchangefiledialog_i.cpp #465476:465477
@@ -69,15 +69,17 @@
void KstChangeFileDialogI::updateChangeFileDialog() {
KstRVectorList rvl = kstObjectSubList<KstVector,KstRVector>(KST::vectorList);
KstRMatrixList rml = kstObjectSubList<KstMatrix,KstRMatrix>(KST::matrixList);
-
+ QMap<QString, QString> filesUsed;
+ int i;
+
// clear list
ChangeFileCurveList->clear();
// first add vectors
- int i;
for (i = 0; i < (int)rvl.count(); i++) {
rvl[i]->readLock();
ChangeFileCurveList->insertItem(rvl[i]->tagName());
+ filesUsed.insert(rvl[i]->filename(), rvl[i]->filename());
rvl[i]->readUnlock();
}
@@ -85,6 +87,7 @@
for (i = 0; i < (int)rml.count(); i++) {
rml[i]->readLock();
ChangeFileCurveList->insertItem(rml[i]->tagName());
+ filesUsed.insert(rml[i]->filename(), rml[i]->filename());
rml[i]->readUnlock();
}
@@ -96,9 +99,10 @@
_files->clear();
KstReadLocker ml(&KST::dataSourceList.lock());
for (KstDataSourceList::Iterator it = KST::dataSourceList.begin(); it != KST::dataSourceList.end(); ++it) {
- _files->insertItem((*it)->fileName());
+ if (filesUsed.contains((*it)->fileName())) {
+ _files->insertItem((*it)->fileName());
+ }
}
-
if (_files->contains(currentFile)) {
_files->setCurrentText(currentFile);
}
More information about the Kst
mailing list