Limit the row count properly when displaying CSV file

The import dialog now displays only a maximum of 10 lines of the CSV
file to be imported.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Miika Turkia 2015-01-24 17:03:12 +02:00 committed by Dirk Hohndel
parent 29c6d03dfa
commit 6fb0465654

View file

@ -492,7 +492,7 @@ void DiveLogImportDialog::loadFileContents(int value, whatChanged triggeredBy)
while (strlen(f.readLine()) > 3 && !f.atEnd());
}
while (rows < 10 || !f.atEnd()) {
while (rows < 10 && !f.atEnd()) {
QString currLine = f.readLine();
currColumns = currLine.split(separator);
fileColumns.append(currColumns);