[Kst] extragear/graphics/kst/kst
George Staikos
staikos at kde.org
Thu Dec 15 00:05:27 CET 2005
SVN commit 488569 by staikos:
set nsamples properly for the case where f0 is an absolute date
M +2 -1 datawizard.ui.h
M +2 -1 kstchangenptsdialog_i.cpp
M +4 -2 kstvectordialog_i.cpp
--- trunk/extragear/graphics/kst/kst/datawizard.ui.h #488568:488569
@@ -514,7 +514,8 @@
double msCount = ds->relativeTimeForSample(frameCount - 1);
nValue = frameCount - 1 - ds->sampleForTime(msCount - nValStored);
} else {
- nValue = ds->sampleForTime(ds->relativeTimeForSample(f0Value) + nValStored);
+ double fTime = ds->relativeTimeForSample(f0Value);
+ nValue = ds->sampleForTime(fTime + nValStored) - ds->sampleForTime(fTime);
}
} else {
nValue = int(_kstDataRange->nValue());
--- trunk/extragear/graphics/kst/kst/kstchangenptsdialog_i.cpp #488568:488569
@@ -115,7 +115,8 @@
double msCount = ds->relativeTimeForSample(frameCount - 1);
n = frameCount - 1 - ds->sampleForTime(msCount - nValStored);
} else {
- n = ds->sampleForTime(ds->relativeTimeForSample(f0) + nValStored);
+ double fTime = ds->relativeTimeForSample(f0);
+ n = ds->sampleForTime(fTime + nValStored) - ds->sampleForTime(fTime);
}
ds->readUnlock();
} else {
--- trunk/extragear/graphics/kst/kst/kstvectordialog_i.cpp #488568:488569
@@ -370,7 +370,8 @@
double msCount = file->relativeTimeForSample(frameCount - 1);
n = frameCount - 1 - file->sampleForTime(msCount - nValStored);
} else {
- n = file->sampleForTime(file->relativeTimeForSample(f0) + nValStored);
+ double fTime = file->relativeTimeForSample(f0);
+ n = file->sampleForTime(fTime + nValStored) - file->sampleForTime(fTime);
}
} else {
n = int(_w->_kstDataRange->nValue());
@@ -520,7 +521,8 @@
double msCount = file->relativeTimeForSample(frameCount - 1);
n = frameCount - 1 - file->sampleForTime(msCount - nValStored);
} else {
- n = file->sampleForTime(file->relativeTimeForSample(f0) + nValStored);
+ double fTime = file->relativeTimeForSample(f0);
+ n = file->sampleForTime(fTime + nValStored) - file->sampleForTime(fTime);
}
} else {
n = int(_w->_kstDataRange->nValue());
More information about the Kst
mailing list