diff --git a/gnucash/import-export/csv-imp/gnc-import-tx.cpp b/gnucash/import-export/csv-imp/gnc-import-tx.cpp index 6c2f283779..b3c1b32e53 100644 --- a/gnucash/import-export/csv-imp/gnc-import-tx.cpp +++ b/gnucash/import-export/csv-imp/gnc-import-tx.cpp @@ -182,6 +182,7 @@ void GncTxImport::base_account (Account* base_account) return; } + auto base_account_is_new = m_settings.m_base_account == nullptr; m_settings.m_base_account = base_account; if (m_settings.m_base_account) @@ -192,10 +193,17 @@ void GncTxImport::base_account (Account* base_account) set_column_type(col_type_it - m_settings.m_column_types.begin(), GncTransPropType::NONE); - /* Set default account for each line's split properties */ - for (auto line : m_parsed_lines) - std::get(line)->set_account (m_settings.m_base_account); - + if (base_account_is_new) + { + /* Set default account for each line's split properties */ + for (auto line : m_parsed_lines) + std::get(line)->set_account (m_settings.m_base_account); + } + else + { + /* Reparse all of the lines with the new base account's commodity. */ + tokenize(false); + } } }