* Goup/Ungroup initial work
* Add INSTALL file * Adapt KissCount to new resolution
This commit is contained in:
@@ -21,7 +21,9 @@
|
||||
|
||||
KissCount::KissCount(const char* bdd_filename) : _user(NULL)
|
||||
{
|
||||
_wxUI = new wxUI(this, wxT("KissCount"), wxPoint(50, 50), wxSize(1024, 768));
|
||||
wxRect rect = wxDisplay().GetGeometry();
|
||||
|
||||
_wxUI = new wxUI(this, wxT("KissCount"), wxPoint(50, 50), wxSize(rect.width-rect.x, rect.height-rect.y));
|
||||
|
||||
_wxUI->SetLanguage(wxLocale::GetSystemLanguage());
|
||||
|
||||
@@ -218,6 +220,7 @@ std::map<int, std::vector<int> > KissCount::GetAllOperations()
|
||||
void KissCount::GenerateMonth(int monthFrom, int yearFrom, int monthTo, int yearTo)
|
||||
{
|
||||
std::vector<Operation>::iterator it;
|
||||
std::map<wxString, wxString> meta;
|
||||
Operation op;
|
||||
|
||||
_db->GenerateMonth(_user, monthFrom, yearFrom, monthTo, yearTo);
|
||||
@@ -239,8 +242,20 @@ void KissCount::GenerateMonth(int monthFrom, int yearFrom, int monthTo, int year
|
||||
op.year = yearTo;
|
||||
op.checked = false;
|
||||
op.id = AddOperation(op);
|
||||
if (op.meta)
|
||||
meta[it->id] = op.id;
|
||||
(*_user->_operations[yearTo])[monthTo].push_back(op);
|
||||
}
|
||||
|
||||
// Re Generate parents
|
||||
for(it = (*_user->_operations[yearFrom])[monthFrom].begin();
|
||||
it != (*_user->_operations[yearFrom])[monthFrom].end()
|
||||
&& it->fix_cost;
|
||||
it++)
|
||||
{
|
||||
if (it->parent.Length())
|
||||
it->parent = meta[it->parent];
|
||||
}
|
||||
}
|
||||
_wxUI->GenerateMonth(monthTo, yearTo);
|
||||
}
|
||||
|
||||
@@ -27,6 +27,8 @@
|
||||
#include <model/model.h>
|
||||
#include <view/wxUI.h>
|
||||
|
||||
#include <wx/display.h>
|
||||
|
||||
#define APP_VERSION "v0.1 beta"
|
||||
|
||||
class wxUI;
|
||||
|
||||
Reference in New Issue
Block a user