RideImport MUST notify charts

Essentially reverting the commit 0ba93fe61
This commit is contained in:
Mark Liversedge
2013-04-10 12:43:20 +01:00
parent 961d8a0c46
commit 4e512bac2e

View File

@@ -824,7 +824,7 @@ RideImportWizard::abortClicked()
tableWidget->item(i,5)->setText(tr("File Overwritten"));
} else {
tableWidget->item(i,5)->setText(tr("File Saved"));
mainWindow->addRide(QFileInfo(fulltarget).fileName(), false);
mainWindow->addRide(QFileInfo(fulltarget).fileName(), true);
}
}
@@ -869,7 +869,7 @@ RideImportWizard::abortClicked()
QFile source(filenames[i]);
if (source.copy(fulltarget)) {
tableWidget->item(i,5)->setText(tr("File Saved"));
mainWindow->addRide(QFileInfo(fulltarget).fileName(), false); // add to tree view
mainWindow->addRide(QFileInfo(fulltarget).fileName(), true); // add to tree view
// free immediately otherwise all imported rides are cached
// and with large imports this can lead to memory exhaustion
// BUT! Some charts/windows will hava snaffled away the ridefile