Skip to content

Commit

Permalink
Merge commit '8abacbaaefc70d4839e555152429303769802625'
Browse files Browse the repository at this point in the history
  • Loading branch information
ftomei committed Dec 16, 2024
2 parents a794e3a + 8abacba commit 59c961e
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions agrolib/project/project.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2468,12 +2468,22 @@ bool Project::loadGlocalStationsCsv(QString fileName, std::vector<std::vector<st
while(!myStream.atEnd())
{
line = myStream.readLine().split(',');
for (int i = 1; i < line.size(); i++)
temp.push_back(line[i].toStdString());
if (line.size() > 1)
{
int areaNr = line[0].toInt();
for (int i = 1; i < line.size(); i++)
{
temp.push_back(line[i].toStdString());
}

areaPoints.resize(line[0].toInt() + 1);
areaPoints[line[0].toInt()] = temp;
temp.clear();
if (areaPoints.empty() || areaNr > (areaPoints.size() - 1))
{
areaPoints.resize(areaNr + 1);
}

areaPoints[areaNr] = temp;
temp.clear();
}
}
myFile.close();

Expand Down

0 comments on commit 59c961e

Please sign in to comment.