mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-15 00:49:55 +00:00
combine setActive and rideSelected
And pay attention to MainWindow::activeTab, such that only the active tab redraws itself when changing rides. This change really increases GC's responsiveness when scrolling through the ride list.
This commit is contained in:
@@ -81,6 +81,8 @@ HistogramWindow::HistogramWindow(MainWindow *mainWindow) :
|
||||
void
|
||||
HistogramWindow::rideSelected()
|
||||
{
|
||||
if (mainWindow->activeTab() != this)
|
||||
return;
|
||||
RideItem *ride = mainWindow->rideItem();
|
||||
if (!ride)
|
||||
return;
|
||||
@@ -95,6 +97,8 @@ HistogramWindow::rideSelected()
|
||||
void
|
||||
HistogramWindow::intervalSelected()
|
||||
{
|
||||
if (mainWindow->activeTab() != this)
|
||||
return;
|
||||
RideItem *ride = mainWindow->rideItem();
|
||||
if (!ride) return;
|
||||
|
||||
@@ -105,6 +109,8 @@ HistogramWindow::intervalSelected()
|
||||
void
|
||||
HistogramWindow::zonesChanged()
|
||||
{
|
||||
if (mainWindow->activeTab() != this)
|
||||
return;
|
||||
powerHist->refreshZoneLabels();
|
||||
powerHist->replot();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user