Avoid Dump in Merge Activity Wizard

... Only allow "Next" if 2nd file is loaded (otherwise a dump occurs)

(cherry picked from commit 88b8479cbb90c8306ca32c0d193199ed895db95c)
This commit is contained in:
Joern
2014-05-30 10:27:30 +02:00
parent 570ad7301c
commit 2ae27ed71c
2 changed files with 11 additions and 0 deletions

View File

@@ -159,6 +159,8 @@ MergeUpload::importFile(QList<QString> files)
ride2Label->setText(tr("Second ride")+" "+ride->startTime().toString(tr("MMM d, yyyy - hh:mm:ss")));
wizard->ride2 = ride;
ride2Loaded = TRUE;
emit completeChanged();
}
} else {
@@ -170,6 +172,13 @@ MergeUpload::importFile(QList<QString> files)
}
bool MergeUpload::isComplete() const
{
return ride2Loaded;
}
// Synchronise start of files
MergeSync::MergeSync(MergeActivityWizard *parent) : QWizardPage(parent), wizard(parent)
{

View File

@@ -146,6 +146,8 @@ class MergeUpload : public QWizardPage
QPushButton *uploadButton;
QLabel *labelSuccess, *ride2Label;
bool isComplete() const;
bool ride2Loaded = FALSE;
private slots:
void importFile();