mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-13 16:18:42 +00:00
@@ -676,7 +676,10 @@ AllPlot::setXTitle()
|
||||
void
|
||||
AllPlot::setDataFromPlot(AllPlot *plot, int startidx, int stopidx)
|
||||
{
|
||||
if (plot == NULL) return;
|
||||
if (plot == NULL) {
|
||||
rideItem = NULL;
|
||||
return;
|
||||
}
|
||||
|
||||
referencePlot = plot;
|
||||
|
||||
|
||||
@@ -353,6 +353,7 @@ AllPlotWindow::AllPlotWindow(MainWindow *mainWindow) :
|
||||
connect(mainWindow, SIGNAL(intervalSelected()), this, SLOT(intervalSelected()));
|
||||
connect(mainWindow, SIGNAL(configChanged()), allPlot, SLOT(configChanged()));
|
||||
connect(mainWindow, SIGNAL(configChanged()), this, SLOT(configChanged()));
|
||||
connect(mainWindow, SIGNAL(rideDeleted(RideItem*)), this, SLOT(rideDeleted(RideItem*)));
|
||||
}
|
||||
|
||||
void
|
||||
@@ -551,6 +552,20 @@ AllPlotWindow::rideSelected()
|
||||
stale = false;
|
||||
}
|
||||
|
||||
void
|
||||
AllPlotWindow::rideDeleted(RideItem *ride)
|
||||
{
|
||||
if (ride == myRideItem) {
|
||||
// we have nothing to show
|
||||
setProperty("ride", QVariant::fromValue<RideItem*>(NULL));
|
||||
|
||||
// notify all the plots, because when zones are redrawn
|
||||
// they will try and reference AllPlot::rideItem
|
||||
setAllPlotWidgets(NULL);
|
||||
fullPlot->setDataFromRide(NULL);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
AllPlotWindow::zonesChanged()
|
||||
{
|
||||
|
||||
@@ -87,6 +87,7 @@ class AllPlotWindow : public GcWindow
|
||||
|
||||
// trap GC signals
|
||||
void rideSelected();
|
||||
void rideDeleted(RideItem *ride);
|
||||
void intervalSelected();
|
||||
void zonesChanged();
|
||||
void intervalsChanged();
|
||||
|
||||
Reference in New Issue
Block a user