mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-16 01:19:57 +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:
@@ -101,6 +101,7 @@ PerformanceManagerWindow::PerformanceManagerWindow(MainWindow *mainWindow) :
|
||||
connect(metricCombo, SIGNAL(currentIndexChanged(int)),
|
||||
this, SLOT(metricChanged()));
|
||||
connect(mainWindow, SIGNAL(configChanged()), this, SLOT(configChanged()));
|
||||
connect(mainWindow, SIGNAL(rideSelected()), this, SLOT(rideSelected()));
|
||||
}
|
||||
|
||||
PerformanceManagerWindow::~PerformanceManagerWindow()
|
||||
@@ -125,9 +126,12 @@ void PerformanceManagerWindow::metricChanged()
|
||||
replot();
|
||||
}
|
||||
|
||||
void PerformanceManagerWindow::setActive(bool value)
|
||||
void PerformanceManagerWindow::rideSelected()
|
||||
{
|
||||
if (active=value) replot();
|
||||
bool wasActive = active;
|
||||
active = (mainWindow->activeTab() == this);
|
||||
if (!wasActive && active)
|
||||
replot();
|
||||
}
|
||||
|
||||
void PerformanceManagerWindow::replot()
|
||||
|
||||
Reference in New Issue
Block a user