BlankState: Analysis view more blanks

- Better handling of a NULL ride for most of the analysis charts
- Don't show activity editor if no data rows to edit
This commit is contained in:
Mark Liversedge
2013-02-06 11:48:52 +00:00
parent 4f3f8701f0
commit 82ecce3af6
9 changed files with 35 additions and 26 deletions

View File

@@ -66,9 +66,14 @@ GoogleMapControl::GoogleMapControl(MainWindow *mw) : GcChartWindow(mw), main(mw)
void
GoogleMapControl::rideSelected()
{
// skip display if data drawn or invalid
if (myRideItem == NULL || !amVisible()) return;
RideItem * ride = myRideItem;
// set/unset blank then decide what to do next
if (!ride || !ride->ride() || !ride->ride()->dataPoints().count()) setIsBlank(true);
else setIsBlank(false);
// skip display if data already drawn or invalid
if (myRideItem == NULL || !amVisible()) return;
if (ride == current || !ride || !ride->ride()) return;
else current = ride;