mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-14 16:39:57 +00:00
Honour RideFile::startTime
When saving the value of startTime should be checked to see if the filename/notes need to be renamed. In addition, RideItem now allows the startTime to be modified and reflected in the ride list. When importing .gc ridefiles the file is serialized with the correct startTime if the user edited it during import.
This commit is contained in:
committed by
Sean Rhea
parent
02a60735f0
commit
4e7e6cfb3a
@@ -199,7 +199,7 @@ MainWindow::MainWindow(const QDir &home) :
|
||||
QDateTime dt;
|
||||
if (parseRideFileName(name, ¬esFileName, &dt)) {
|
||||
last = new RideItem(RIDE_TYPE, home.path(),
|
||||
name, dt, zones(), notesFileName);
|
||||
name, dt, zones(), notesFileName, this);
|
||||
allRides->addChild(last);
|
||||
calendar->update();
|
||||
}
|
||||
@@ -481,7 +481,7 @@ MainWindow::addRide(QString name, bool bSelect /*=true*/)
|
||||
assert(false);
|
||||
}
|
||||
RideItem *last = new RideItem(RIDE_TYPE, home.path(),
|
||||
name, dt, zones(), notesFileName);
|
||||
name, dt, zones(), notesFileName, this);
|
||||
|
||||
QVariant isAscending = settings->value(GC_ALLRIDES_ASCENDING,Qt::Checked); // default is ascending sort
|
||||
int index = 0;
|
||||
@@ -1314,3 +1314,11 @@ MainWindow::notifyConfigChanged()
|
||||
{
|
||||
configChanged();
|
||||
}
|
||||
|
||||
// notify children that rideSelected
|
||||
// called by RideItem when its date/time changes
|
||||
void
|
||||
MainWindow::notifyRideSelected()
|
||||
{
|
||||
rideSelected();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user