[Kst] [Bug 111570] Change Data File's 'All From" should only include files that are currently in use.
Andrew Walker
arwalker at sumusltd.com
Thu Sep 29 23:49:17 CEST 2005
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
http://bugs.kde.org/show_bug.cgi?id=111570
arwalker sumusltd com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
------- Additional Comments From arwalker sumusltd com 2005-09-29 23:49 -------
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