mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-14 16:39:57 +00:00
UI Nits: Importing GTC Export screen updates
When importing a GTC export (which contains multiple ride files in a single .TCX) the screen update stalls whilst the file is split. The import dialog is half drawn and looks ugly to the user for a split second. We now delay updates until the export has been expanded into separate files, which means there is a slightly longer delay as the file is initially processed, but the screen updates are cleaner.
This commit is contained in:
@@ -254,9 +254,9 @@ RideImportWizard::process()
|
||||
|
||||
}
|
||||
|
||||
QApplication::processEvents();
|
||||
if (aborted) { done(0); }
|
||||
repaint();
|
||||
QApplication::processEvents();
|
||||
|
||||
// Pass 2 - Read in with the relevant RideFileReader method
|
||||
|
||||
@@ -273,8 +273,10 @@ RideImportWizard::process()
|
||||
tableWidget->item(i,5)->setText(tr("Parsing..."));
|
||||
tableWidget->setCurrentCell(i,5);
|
||||
QApplication::processEvents();
|
||||
|
||||
if (aborted) { done(0); }
|
||||
this->repaint();
|
||||
QApplication::processEvents();
|
||||
|
||||
QList<RideFile*> rides;
|
||||
RideFile *ride = RideFileFactory::instance().openRideFile(mainWindow, thisfile, errors, &rides);
|
||||
@@ -295,6 +297,7 @@ RideImportWizard::process()
|
||||
(willhave > 9 && willhave < 17) ? 8 : 0),
|
||||
118 + (willhave > 16 ? 17*20 : (willhave+1) * 20));
|
||||
|
||||
|
||||
// ok so create a temporary file and add to the tableWidget
|
||||
int counter = 0;
|
||||
foreach(RideFile *extracted, rides) {
|
||||
@@ -355,8 +358,8 @@ RideImportWizard::process()
|
||||
counter++;
|
||||
|
||||
tableWidget->adjustSize();
|
||||
QApplication::processEvents();
|
||||
}
|
||||
QApplication::processEvents();
|
||||
|
||||
|
||||
// progress bar needs to adjust...
|
||||
|
||||
Reference in New Issue
Block a user