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:
@@ -228,6 +228,8 @@ AllPlotWindow::AllPlotWindow(MainWindow *mainWindow) :
|
||||
void
|
||||
AllPlotWindow::rideSelected()
|
||||
{
|
||||
if (mainWindow->activeTab() != this)
|
||||
return;
|
||||
RideItem *ride = mainWindow->rideItem();
|
||||
if (!ride)
|
||||
return;
|
||||
@@ -245,6 +247,8 @@ AllPlotWindow::rideSelected()
|
||||
void
|
||||
AllPlotWindow::zonesChanged()
|
||||
{
|
||||
if (mainWindow->activeTab() != this)
|
||||
return;
|
||||
allPlot->refreshZoneLabels();
|
||||
allPlot->replot();
|
||||
}
|
||||
@@ -252,6 +256,8 @@ AllPlotWindow::zonesChanged()
|
||||
void
|
||||
AllPlotWindow::intervalsChanged()
|
||||
{
|
||||
if (mainWindow->activeTab() != this)
|
||||
return;
|
||||
allPlot->refreshIntervalMarkers();
|
||||
allPlot->replot();
|
||||
foreach (AllPlot *plot, allPlots) {
|
||||
@@ -263,6 +269,8 @@ AllPlotWindow::intervalsChanged()
|
||||
void
|
||||
AllPlotWindow::intervalSelected()
|
||||
{
|
||||
if (mainWindow->activeTab() != this)
|
||||
return;
|
||||
hideSelection();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user