[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [labplot] src/backend/datasources/filters: [Ngspice] improve skipping rows
From: Stefan Gerlach <null () kde ! org>
Date: 2018-09-01 8:18:02
Message-ID: E1fw16Y-0007zT-Lv () code ! kde ! org
[Download RAW message or body]
Git commit 5f9db38090bfe57ff1061559b1222de004266e30 by Stefan Gerlach.
Committed on 01/09/2018 at 06:27.
Pushed by sgerlach into branch 'master'.
[Ngspice] improve skipping rows
M +4 -2 src/backend/datasources/filters/NgspiceRawBinaryFilter.cpp
https://commits.kde.org/labplot/5f9db38090bfe57ff1061559b1222de004266e30
diff --git a/src/backend/datasources/filters/NgspiceRawBinaryFilter.cpp \
b/src/backend/datasources/filters/NgspiceRawBinaryFilter.cpp index d66017ad..e9c169a7 \
100644
--- a/src/backend/datasources/filters/NgspiceRawBinaryFilter.cpp
+++ b/src/backend/datasources/filters/NgspiceRawBinaryFilter.cpp
@@ -221,9 +221,11 @@ void NgspiceRawBinaryFilterPrivate::readDataFromFile(const \
QString& fileName, Ab const int columnOffset = \
dataSource->prepareImport(m_dataContainer, importMode, actualRows, actualCols, \
vectorNames, columnModes);
//skip data lines, if required
- DEBUG(" Skipping " << startRow - 1 << " lines");
const int skip = hasComplexValues ? 2 * vars * (startRow - 1) : vars * (startRow - \
1);
- file.read(8 * skip);
+ if (skip > 0) {
+ DEBUG(" Skipping " << startRow - 1 << " lines");
+ file.read(8 * skip);
+ }
//read the data points
int currentRow = 0; // indexes the position in the vector(column)
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic