Fixup Mark Exhaustion

.. allow delete
.. refresh properly
.. double click on axis to edit list of exhaustions in the ride
This commit is contained in:
Mark Liversedge
2016-03-08 21:07:56 +00:00
parent 5b26bb7bdc
commit fbfa02e73e
4 changed files with 90 additions and 48 deletions

View File

@@ -1641,6 +1641,22 @@ void RideFile::removeReference(int index)
referencePoints_.remove(index);
}
void RideFile::removeExhaustion(int index)
{
if (index < 0) return;
// wipe the index'th exhaustion point in the ride
int i=-1;
for(int k=0; k<referencePoints_.count(); k++) {
if (referencePoints_[k]->secs > 0) {
if (++i == index) {
referencePoints_.removeAt(k);
return;
}
}
}
}
bool
RideFile::parseRideFileName(const QString &name, QDateTime *dt)
{