[Kst] kst_fastskip_branch: kdeextragear-2/kst/kst
George Staikos
staikos at kde.org
Mon Jan 17 23:45:07 CET 2005
CVS commit by staikos:
reset when boxcar changes, and don't use external skip when boxcar is on.
M +15 -10 kstrvector.cpp 1.70.2.2
--- kdeextragear-2/kst/kst/kstrvector.cpp #1.70.2.1:1.70.2.2
@@ -198,5 +198,4 @@ void KstRVector::changeFile(KstDataSourc
KstDebug::self()->log(i18n("Data file for vector %1 was not opened.").arg(tagName()), KstDebug::Warning);
}
- _dontUseSkipAccel = false;
_file = in_file;
if (_file) {
@@ -370,4 +369,5 @@ QString KstRVector::label() const {
void KstRVector::reset() { // must be called with a lock
+ _dontUseSkipAccel = false;
if (_file) {
SPF = _file->samplesPerFrame(_field);
@@ -499,8 +499,11 @@ KstObject::UpdateType KstRVector::doUpda
int rc;
int lastRead = -1;
- // FIXME: DoAve ??
+ if (DoAve) {
+ // We don't support boxcar inside data sources yet.
+ _dontUseSkipAccel = true;
+ } else {
rc = _file->readField(_v + _numSamples, _field, new_f0, (new_nf - NF)/Skip, Skip, &lastRead);
if (rc != -9999) {
- kdDebug() << "USED SKIP FOR READ - " << _field << " - rc=" << rc << " for Skip=" << Skip << " s=" << new_f0 << " n=" << (DoAve ? (new_nf - NF)/Skip : -1) << endl;
+ //kdDebug() << "USED SKIP FOR READ - " << _field << " - rc=" << rc << " for Skip=" << Skip << " s=" << new_f0 << " n=" << (DoAve ? (new_nf - NF)/Skip : -1) << endl;
if (rc >= 0) {
n_read = rc;
@@ -512,4 +515,5 @@ KstObject::UpdateType KstRVector::doUpda
}
}
+ }
if (_dontUseSkipAccel) {
n_read = 0;
@@ -574,4 +578,5 @@ KstObject::UpdateType KstRVector::doUpda
_dirty = false;
if (_numSamples != _size && !(_numSamples == 0 && _size == 1)) {
+ kdDebug() << "SET DIRTY since _numSamples = " << _numSamples << " but _size = " << _size << endl;
_dirty = true;
for (i = _numSamples; i < _size; i++) {
More information about the Kst
mailing list