Check for a blank line on the transaction importer

If you have some blank lines, just newlines at the end of file and you
have an account column and do not remove them you will get an error
advising that there is no account column selected or account specified
so this change removes them from being parsed.
This commit is contained in:
Robert Fewell 2019-06-28 14:06:35 +01:00
parent a4bbaf968f
commit cdf348df24

View File

@ -392,11 +392,12 @@ void GncTxImport::tokenize (bool guessColTypes)
m_parsed_lines.clear();
for (auto tokenized_line : m_tokenizer->get_tokens())
{
auto length = tokenized_line.size();
if (length > 0)
m_parsed_lines.push_back (std::make_tuple (tokenized_line, std::string(),
std::make_shared<GncPreTrans>(date_format()),
std::make_shared<GncPreSplit>(date_format(), currency_format()),
false));
auto length = tokenized_line.size();
if (length > max_cols)
max_cols = length;
}