[Kst] extragear/graphics/kst/kst
George Staikos
staikos at kde.org
Tue Jan 24 22:18:02 CET 2006
This makes much more sense. Somehow a vector is dropping out of the list
between showing the dialog and executing?
On Tuesday 24 January 2006 14:21, Andrew Walker wrote:
> 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();
> _______________________________________________
> Kst mailing list
> Kst at kde.org
> https://mail.kde.org/mailman/listinfo/kst
--
George Staikos
KDE Developer http://www.kde.org/
Staikos Computing Services Inc. http://www.staikos.net/
More information about the Kst
mailing list