mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-14 08:38:45 +00:00
Remove update 'flicker' when tab selected
The recent patch to reduce redraws when rides are selected causes each tab to redraw whenever the tab IS selected. This patch reduces this by remembering the current ride plotted. It also fixes the "double draw" in GoogleMapControl and AllPlot when selected for the first time.
This commit is contained in:
committed by
Robert Carlsen
parent
07623bf94f
commit
1751d8bf12
@@ -239,15 +239,22 @@ AllPlotWindow::rideSelected()
|
||||
if (mainWindow->activeTab() != this)
|
||||
return;
|
||||
RideItem *ride = mainWindow->rideItem();
|
||||
if (!ride)
|
||||
if (!ride || ride == current)
|
||||
return;
|
||||
current = ride;
|
||||
|
||||
int showit = showStack->isChecked();
|
||||
if (showit) allPlot->hide();
|
||||
else allPlot->show();
|
||||
|
||||
// set it up anyway since the stack plots
|
||||
// reuse the arrays
|
||||
clearSelection(); // clear any ride interval selection data
|
||||
setAllPlotWidgets(ride);
|
||||
allPlot->setDataI(ride);
|
||||
allZoomer->setZoomBase();
|
||||
|
||||
// update stacked view if that is set
|
||||
int showit = showStack->isChecked();
|
||||
setShowStack(0); // zap whats there
|
||||
setShowStack(showit);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user