[Kst] extragear/graphics/kst/kst
Andrew Walker
arwalker at sumusltd.com
Tue Jan 24 20:21:22 CET 2006
SVN commit 502061 by arwalker:
CCBUG:120490 No longer assume a direct correspondence between the list box entries and the vector list entries.
M +9 -6 kstchangenptsdialog_i.cpp
--- trunk/extragear/graphics/kst/kst/kstchangenptsdialog_i.cpp #502060:502061
@@ -65,9 +65,9 @@
CurveList->clear();
KstRVectorList rvl = kstObjectSubList<KstVector,KstRVector>(KST::vectorList);
- /* insert vectors into ChangeNptsCurveList */
+ // insert vectors into ChangeNptsCurveList
for (uint i = 0; i < rvl.count(); i++) {
- KstRVectorPtr vector = rvl[i]; // FIXME: broken
+ KstRVectorPtr vector = rvl[i];
if (vector) {
vector->readLock();
CurveList->insertItem(vector->tagName(), -1);
@@ -95,11 +95,12 @@
void KstChangeNptsDialogI::applyNptsChange() {
KstRVectorList rvl = kstObjectSubList<KstVector,KstRVector>(KST::vectorList);
- for (uint i_vector = 0; i_vector < CurveList->count(); ++i_vector) {
- if (CurveList->isSelected(i_vector)) {
- KstRVectorPtr vector = rvl[i_vector]; // FIXME: broken
+ for (uint i = 0; i < CurveList->count(); ++i) {
+ if (CurveList->isSelected(i)) {
+ KstRVectorPtr vector = *(rvl.findTag(CurveList->text(i)));
if (vector) {
int f0, n;
+
vector->readLock();
if (_kstDataRange->isStartRelativeTime() && vector->dataSource()) {
vector->dataSource()->readLock();
@@ -132,6 +133,7 @@
n = int(_kstDataRange->nValue());
}
vector->readUnlock();
+
vector->writeLock();
vector->changeFrames(
(_kstDataRange->CountFromEnd->isChecked() ? -1 : f0),
@@ -174,6 +176,7 @@
_kstDataRange->DoSkip->setChecked(vector->doSkip());
_kstDataRange->DoFilter->setChecked(vector->doAve());
_kstDataRange->updateEnables();
+
vector->writeUnlock();
}
}
@@ -185,7 +188,7 @@
bool supportsTime = true;
for (uint i = 0; i < cnt; ++i) {
if (CurveList->isSelected(i)) {
- KstRVectorPtr vector = rvl[i]; // FIXME: broken
+ KstRVectorPtr vector = *(rvl.findTag(CurveList->text(i)));
if (vector) {
vector->readLock();
KstDataSourcePtr ds = vector->dataSource();
More information about the Kst
mailing list