Clear spectrogram caches & repaint on src invalidate

Fixes #50
This commit is contained in:
Mike
2016-08-10 21:14:20 +01:00
parent b31d6a03ad
commit e8c1f1f7d1
2 changed files with 10 additions and 1 deletions

View File

@@ -46,6 +46,14 @@ SpectrogramPlot::SpectrogramPlot(std::shared_ptr<SampleSource<std::complex<float
tunerTransform = std::make_shared<TunerTransform>(src.get());
connect(&tuner, &Tuner::tunerMoved, this, &SpectrogramPlot::tunerMoved);
tunerMoved();
src->subscribe(this);
}
void SpectrogramPlot::invalidateEvent()
{
pixmapCache.clear();
fftCache.clear();
emit repaint();
}
void SpectrogramPlot::paintFront(QPainter &painter, QRect &rect, range_t<off_t> sampleRange)