mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-13 16:18:42 +00:00
Compromise on import
.. signal when importing a relatively small number of items (less than 20) .. don't signal when importing a lot of items (more than 20).
This commit is contained in:
@@ -825,7 +825,8 @@ RideImportWizard::abortClicked()
|
||||
tableWidget->item(i,5)->setText(tr("File Overwritten"));
|
||||
} else {
|
||||
tableWidget->item(i,5)->setText(tr("File Saved"));
|
||||
context->athlete->addRide(QFileInfo(fulltarget).fileName(), false);
|
||||
context->athlete->addRide(QFileInfo(fulltarget).fileName(),
|
||||
tableWidget->rowCount() < 20 ? true : false); // don't signal if mass importing
|
||||
}
|
||||
}
|
||||
|
||||
@@ -870,7 +871,9 @@ RideImportWizard::abortClicked()
|
||||
QFile source(filenames[i]);
|
||||
if (source.copy(fulltarget)) {
|
||||
tableWidget->item(i,5)->setText(tr("File Saved"));
|
||||
context->athlete->addRide(QFileInfo(fulltarget).fileName(), false); // add to tree view
|
||||
context->athlete->addRide(QFileInfo(fulltarget).fileName(),
|
||||
tableWidget->rowCount() < 20 ? true : false); // don't signal if mass importing
|
||||
|
||||
// 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
|
||||
|
||||
Reference in New Issue
Block a user