[Kst] extragear/graphics/kst/kst
Rick Chern
rchern at interchange.ubc.ca
Thu Jul 14 23:31:40 CEST 2005
SVN commit 434633 by rchern:
Reload matrices too when reloading data files
M +12 -1 kst.cpp
M +1 -1 kstcsd.cpp
M +5 -1 kstrmatrix.cpp
--- trunk/extragear/graphics/kst/kst/kst.cpp #434632:434633
@@ -1876,7 +1876,7 @@
void KstApp::reload() {
- KstReadLocker ml(&KST::vectorList.lock());
+ KST::vectorList.lock().readLock();
for (KstVectorList::ConstIterator i = KST::vectorList.begin(); i != KST::vectorList.end(); ++i) {
KstRVectorPtr r = kst_cast<KstRVector>(*i);
if (r) {
@@ -1885,6 +1885,17 @@
r->writeUnlock();
}
}
+ KST::vectorList.lock().readUnlock();
+ KST::matrixList.lock().readLock();
+ for (KstMatrixList::ConstIterator i = KST::matrixList.begin(); i != KST::matrixList.end(); ++i) {
+ KstRMatrixPtr r = kst_cast<KstRMatrix>(*i);
+ if (r) {
+ r->writeLock();
+ r->reload();
+ r->writeUnlock();
+ }
+ }
+ KST::matrixList.lock().readUnlock();
}
--- trunk/extragear/graphics/kst/kst/kstcsd.cpp #434632:434633
@@ -136,7 +136,7 @@
int psdLength = int(pow(2.0, (double)(_length-1)));
- KstMatrixPtr outMatrix = new KstMatrix(in_tag+"-csds", psdLength, 1);
+ KstMatrixPtr outMatrix = new KstMatrix(in_tag+"-csd", psdLength, 1);
if (outMatrix->sampleCount() != psdLength) {
_length = 1;
KstDebug::self()->log(i18n("Attempted to create a CSD that used all memory."), KstDebug::Error);
--- trunk/extragear/graphics/kst/kst/kstrmatrix.cpp #434632:434633
@@ -507,8 +507,12 @@
void KstRMatrix::reset() { // must be called with a lock
+ if (_file) {
+ _samplesPerFrameCache = _file->samplesPerFrame(_field);
+ }
resize(0);
- _samplesPerFrameCache = _file->samplesPerFrame(_field);
+ _NS = 0;
+ setDirty();
}
More information about the Kst
mailing list