mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2418 : Import of text grid model fails when comments is on same line as keyword
This commit is contained in:
@@ -342,7 +342,17 @@ void RifEclipseInputFileTools::findKeywordsOnFile(const QString &fileName, std::
|
|||||||
|
|
||||||
filepos = data.pos() - lineLength;
|
filepos = data.pos() - lineLength;
|
||||||
keyPos.filePos = filepos;
|
keyPos.filePos = filepos;
|
||||||
keyPos.keyword = line.trimmed();
|
|
||||||
|
QString keywordCandidate = line;
|
||||||
|
int commentStart = keywordCandidate.indexOf("--");
|
||||||
|
if (commentStart > 0)
|
||||||
|
{
|
||||||
|
keywordCandidate = keywordCandidate.left(commentStart);
|
||||||
|
}
|
||||||
|
|
||||||
|
keywordCandidate = keywordCandidate.trimmed();
|
||||||
|
|
||||||
|
keyPos.keyword = keywordCandidate;
|
||||||
keywords->push_back(keyPos);
|
keywords->push_back(keyPos);
|
||||||
//qDebug() << keyPos.keyword << " - " << keyPos.filePos;
|
//qDebug() << keyPos.keyword << " - " << keyPos.filePos;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user