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:
Sean Rhea
2010-03-11 09:24:02 -05:00
parent 92725db36a
commit cd4fe5fe2e
17 changed files with 54 additions and 45 deletions

View File

@@ -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();
}