gnucash stable: [assistant-stock-txn] clear warnings/errors/infos before preparing last page

Christopher Lam clam at code.gnucash.org
Tue Jun 27 11:42:00 EDT 2023


Updated	 via  https://github.com/Gnucash/gnucash/commit/165fcce8 (commit)
	from  https://github.com/Gnucash/gnucash/commit/fa3043a6 (commit)



commit 165fcce8f54be612cf992c28c1899e25c9db7469
Author: Christopher Lam <christopher.lck at gmail.com>
Date:   Tue Jun 27 23:38:37 2023 +0800

    [assistant-stock-txn] clear warnings/errors/infos before preparing last page
    
    otherwise the messages will accumulate when nagivating back to the
    last page.

diff --git a/gnucash/gnome/assistant-stock-transaction.cpp b/gnucash/gnome/assistant-stock-transaction.cpp
index 116dd512bb..d0b5e5ecf3 100644
--- a/gnucash/gnome/assistant-stock-transaction.cpp
+++ b/gnucash/gnome/assistant-stock-transaction.cpp
@@ -935,6 +935,9 @@ StockAssistantModel::generate_list_of_splits() {
     if (!m_txn_types || !m_txn_type)
         return { false, "Error: txn_type not initialized", {} };
 
+    m_warnings.clear();
+    m_errors.clear();
+    m_infos.clear();
     m_list_of_splits.clear();
 
     gnc_numeric debit = gnc_numeric_zero ();



Summary of changes:
 gnucash/gnome/assistant-stock-transaction.cpp | 3 +++
 1 file changed, 3 insertions(+)



More information about the gnucash-changes mailing list