From 292591c098a6853c1871fde205563953d0346e5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9gory=20Soutad=C3=A9?= Date: Sun, 29 Jan 2012 11:41:51 +0100 Subject: [PATCH] Fix a bug : date wasn't set for last NULL operation --- src/view/grid/GridAccount.cpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/view/grid/GridAccount.cpp b/src/view/grid/GridAccount.cpp index cf96330..a2c9edb 100644 --- a/src/view/grid/GridAccount.cpp +++ b/src/view/grid/GridAccount.cpp @@ -300,7 +300,7 @@ void GridAccount::InsertOperationWithWeek(User* user, Operation& op, int line, b if (op.id && !fix) ComputeWeeks(); } - +#include void GridAccount::InsertOperation(User* user, Operation& op, int line, bool fix, int month, int year) { std::vector::iterator it; @@ -404,19 +404,13 @@ void GridAccount::InsertOperation(User* user, Operation& op, int line, bool fix, } else { - if (curDate.month() == month && - curDate.year() == year) - { - if (!fix) - setItem(line, OP_DATE, new QTableWidgetItem(v.sprintf("%02d/%02d/%d", curDate.day(), month+1, year))); - } - if (fix) { SET_ROW_COLOR(line, view::OWN_YELLOW, Qt::black); } else { + setItem(line, OP_DATE, new QTableWidgetItem(v.sprintf("%02d/%02d/%d", curDate.day(), month+1, year))); SET_ROW_COLOR(line, view::OWN_GREEN, Qt::black); }