Summary: | Unable to create new histogram | ||
---|---|---|---|
Product: | [Applications] kst | Reporter: | Andrew Walker <arwalker> |
Component: | general | Assignee: | kst |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | 1.x | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Andrew Walker
2005-03-24 19:27:51 UTC
There seems to be a similar problem with creation of matrices. Haven't tested similar objects: equations, events, etc. CVS commit by staikos: Finish the code here BUG: 102382 BUG: 102386 M +8 -8 ksthistogram.cpp 1.56 --- kdeextragear-2/kst/kst/ksthistogram.cpp #1.55:1.56 @@ -138,4 +138,6 @@ void KstHistogram::commonConstructor(con v->setProvider(this); _hVector = _outputVectors.insert(HIST, v); + + setDirty(); } @@ -187,7 +189,5 @@ KstObject::UpdateType KstHistogram::upda _W = (_MaxX - _MinX)/double(_NBins); - for (i_bin = 0; i_bin < _NBins; i_bin++) { - Bins[i_bin] = 0; - } + memset(Bins, 0, _NBins*sizeof(*Bins)); ns = _inputVectors[RAWVECTOR]->length(); @@ -292,5 +293,6 @@ void KstHistogram::internalSetNBins(int } Bins = new unsigned long[_NBins]; - _W = (_MaxX - _MinX)/(double)_NBins; + memset(Bins, 0, _NBins*sizeof(*Bins)); + _W = (_MaxX - _MinX)/double(_NBins); _NS = 3 * _NBins + 1; @@ -304,6 +306,4 @@ void KstHistogram::setNBins(int in_n_bin internalSetNBins(in_n_bins); setDirty(); - abort(); // FIXME - update(); // Have to update here otherwise Bins[] is invalid! } |