mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-13 08:08:42 +00:00
Train Elevation Chart - Avoid flooding debug log
When there is no slope/distance infomation. Fixes #4620
This commit is contained in:
@@ -81,7 +81,7 @@ CONSTEXPR RangeColorMapper<RangeColorCriteria, 5> s_gradientToColorMapper{
|
||||
|
||||
void BubbleWidget::paintEvent(QPaintEvent *event)
|
||||
{
|
||||
if (!m_rtData || !m_ergFileAdapter)
|
||||
if (!m_rtData || !m_ergFileAdapter || !m_ergFileAdapter->hasGradient())
|
||||
return;
|
||||
|
||||
QWidget::paintEvent(event);
|
||||
@@ -303,14 +303,12 @@ void
|
||||
ElevationChartWindow::telemetryUpdate(const RealtimeData &rtData)
|
||||
{
|
||||
// If it is not visible, it saves time
|
||||
if (!isVisible())
|
||||
if (!isVisible() || !m_ergFileAdapter.hasGradient())
|
||||
return;
|
||||
m_rtData = rtData;
|
||||
bubbleWidget->setRealtimeData(&m_rtData);
|
||||
|
||||
int npoints = 30;
|
||||
int pointsAfter = 25;
|
||||
int pointsBefore = npoints - pointsAfter;
|
||||
|
||||
QQueue<QPointF> &plotQ = slopeWidget->getPlotQ();
|
||||
plotQ.clear();
|
||||
|
||||
Reference in New Issue
Block a user