From ed52d91a7941b5ea4067382536b1ccea85e995b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9gory=20Soutad=C3=A9?= Date: Thu, 6 Jan 2011 18:19:33 +0100 Subject: [PATCH] Bug of new year --- src/model/Database.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/model/Database.cpp b/src/model/Database.cpp index 0b83830..53278ce 100644 --- a/src/model/Database.cpp +++ b/src/model/Database.cpp @@ -661,6 +661,10 @@ bool Database::LoadOperation(User* user, const wxString& id) op.transfert = set.GetAsString(wxT("transfert")); op.formula = set.GetAsString(wxT("formula")); op.meta = set.GetBool(wxT("meta")); + + if (!user->_operations[op.year]) + user->_operations[op.year] = new std::map >(); + for (it = (*user->_operations[op.year])[op.month].begin(); it != (*user->_operations[op.year])[op.month].end(); it++)