Merge pull request #1239 from Joern-R/fix

Fix - .JSON not updated with man.l changes directly after Import or Download
This commit is contained in:
Mark Liversedge
2015-01-11 17:31:51 +00:00
2 changed files with 5 additions and 0 deletions

View File

@@ -25,6 +25,7 @@
#include "Settings.h"
#include "JsonRideFile.h"
#include "HelpWhatsThis.h"
#include "RideItem.h"
#include <assert.h>
#include <errno.h>
#include <QtGui>
@@ -469,6 +470,8 @@ DownloadRideDialog::downloadClicked()
// now rename
QFile targetFileTmpActivities(targetFileTmpActivitiesName);
targetFileTmpActivities.rename(targetFileActivitiesName);
// and correct the path locally stored in Ride Item
context->ride->setFileName(context->athlete->home->activities().canonicalPath(), targetFileName);
}
if( ! failures )

View File

@@ -974,6 +974,8 @@ RideImportWizard::abortClicked()
// rideCache is successfully updated, let's move the file to the real /activities
if (moveFile(tmpActivitiesFulltarget, finalActivitiesFulltarget)) {
tableWidget->item(i,5)->setText(tr("File Saved"));
// and correct the path locally stored in Ride Item
context->ride->setFileName(homeActivities.canonicalPath(), activitiesTarget);
} else {
tableWidget->item(i,5)->setText(tr("Error - Moving %1 to activities folder").arg(activitiesTarget));
}