[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/work/kst/1.1/kst/kst
From: George Staikos <staikos () kde ! org>
Date: 2005-09-14 20:00:40
Message-ID: 1126728040.280648.12757.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 460698 by staikos:
backport fix for updates of objects depending on plugins
M +3 -0 kstplugin.cpp
M +5 -1 kstvector.cpp
--- branches/work/kst/1.1/kst/kst/kstplugin.cpp #460697:460698
@@ -377,6 +377,9 @@
KstVectorPtr vp = _outputVectors[(*it)._name];
vectorRealloced(vp, _outVectors[vitcnt], _outArrayLens[vitcnt]);
vp->setDirty();
+ // Inefficient, but do we have any other choice? We don't really know
+ // from the plugin how much of this vector is "new" or "shifted"
+ vp->setNewAndShift(vp->length(), vp->numShift());
vp->update(update_counter);
vitcnt++;
} else if ((*it)._type == Plugin::Data::IOValue::FloatType) {
--- branches/work/kst/1.1/kst/kst/kstvector.cpp #460697:460698
@@ -226,7 +226,11 @@
double* KstVector::realloced(double *memptr, int newSize) {
double *old = _v;
_v = memptr;
- NumNew = newSize - _size;
+ if (newSize < _size) {
+ NumNew = newSize; // all new if we shrunk the vector
+ } else {
+ NumNew = newSize - _size;
+ }
_size = newSize;
updateScalars();
return old;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic