From fb2541358c7fc3fa60ef7bb6f49d4ebef449eb70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9gory=20Soutad=C3=A9?= Date: Tue, 26 Feb 2013 15:05:34 +0100 Subject: [PATCH] Fix a regression : meta description always updated to first child description --- src/view/grid/GridAccount.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/view/grid/GridAccount.cpp b/src/view/grid/GridAccount.cpp index 33e403e..d5a1827 100644 --- a/src/view/grid/GridAccount.cpp +++ b/src/view/grid/GridAccount.cpp @@ -1081,7 +1081,7 @@ void GridAccount::OnOperationModified(int row, int col) if (new_op.parent) { parent = GetOperation(new_op.parent); - UpdateMeta(parent); + UpdateMeta(parent); } _kiss->UpdateStats(); @@ -1108,7 +1108,6 @@ void GridAccount::UpdateMeta(Operation& meta) meta.year = op.year; meta.month = op.month; meta.day = op.day; - meta.description = ""; for(it=meta.childs.begin(); it!=meta.childs.end(); it++) { @@ -1119,7 +1118,7 @@ void GridAccount::UpdateMeta(Operation& meta) meta.month = op.month; meta.day = op.day; } - if (!meta.description.length() && op.description.length()) + if (meta.description.length() == 0) meta.description = op.description; if (!category) {