mirror of
https://github.com/miek/inspectrum.git
synced 2026-03-02 22:44:18 +01:00
plotview: Don't recreate the plots all the time
This commit is contained in:
@@ -102,6 +102,9 @@ void SpectrogramPlot::mousePressEvent(QMouseEvent *event)
|
||||
|
||||
void SpectrogramPlot::paintMid(QPainter &painter, QRect &rect, range_t<off_t> sampleRange)
|
||||
{
|
||||
if (!inputSource || inputSource->count() == 0)
|
||||
return;
|
||||
|
||||
for (int x = rect.left(); x < rect.right(); x += linesPerTile()) {
|
||||
QPixmap *tile = getPixmapTile(sampleRange.minimum + x * getStride());
|
||||
painter.drawPixmap(QRect(x, rect.y(), linesPerTile(), fftSize), *tile);
|
||||
|
||||
Reference in New Issue
Block a user