[PATCH 05/11] Limit the row count properly when displaying CSV file

Miika Turkia miika.turkia at gmail.com
Sat Jan 24 07:03:12 PST 2015


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 at gmail.com>
---
 qt-ui/divelogimportdialog.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/qt-ui/divelogimportdialog.cpp b/qt-ui/divelogimportdialog.cpp
index 8c3099f..0aa6f90 100644
--- a/qt-ui/divelogimportdialog.cpp
+++ b/qt-ui/divelogimportdialog.cpp
@@ -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);
-- 
1.9.1



More information about the subsurface mailing list