Temp commit
This commit is contained in:
@@ -162,7 +162,8 @@ void GridAccount::UpdateOperation(Operation& op)
|
||||
for(i=0; i < (int)_operations->size(); i++)
|
||||
if ((*_operations)[i].id == op.id)
|
||||
{
|
||||
_kiss->UpdateOperation(op);
|
||||
if (_databaseSynchronization)
|
||||
_kiss->UpdateOperation(op);
|
||||
(*_operations)[i] = op;
|
||||
break;
|
||||
}
|
||||
@@ -181,10 +182,10 @@ void GridAccount::ClearGrid()
|
||||
{
|
||||
std::vector<Operation> operations;
|
||||
|
||||
LoadOperations(&operations, false, false, 0, 0);
|
||||
LoadOperations(&operations, 0, 0);
|
||||
}
|
||||
|
||||
void GridAccount::LoadOperations(std::vector<Operation>* operations, bool canAddOperation, bool setWeek, int month, int year)
|
||||
void GridAccount::LoadOperations(std::vector<Operation>* operations, int month, int year)
|
||||
{
|
||||
std::vector<Operation>::iterator it;
|
||||
User* user = _kiss->GetUser();
|
||||
@@ -195,7 +196,6 @@ void GridAccount::LoadOperations(std::vector<Operation>* operations, bool canAdd
|
||||
|
||||
_loadOperations = true;
|
||||
_operations = operations;
|
||||
_canAddOperation = canAddOperation;
|
||||
_curMonth = month;
|
||||
_curYear = year;
|
||||
_displayedOperations.clear();
|
||||
@@ -210,7 +210,7 @@ void GridAccount::LoadOperations(std::vector<Operation>* operations, bool canAdd
|
||||
{
|
||||
if (it->parent.Length()) continue;
|
||||
|
||||
if (setWeek)
|
||||
if (_setWeek)
|
||||
InsertOperationWithWeek(user, *it, ++curLine, true, it->month, it->year);
|
||||
else
|
||||
InsertOperation(user, *it, ++curLine, true, it->month, it->year);
|
||||
@@ -222,7 +222,7 @@ void GridAccount::LoadOperations(std::vector<Operation>* operations, bool canAdd
|
||||
{
|
||||
if (it->parent.Length()) continue;
|
||||
|
||||
if (setWeek)
|
||||
if (_setWeek)
|
||||
InsertOperationWithWeek(user, *it, ++curLine, false, it->month, it->year);
|
||||
else
|
||||
InsertOperation(user, *it, ++curLine, false, it->month, it->year);
|
||||
@@ -1534,13 +1534,14 @@ void GridAccount::MassUpdate(std::vector<int>& rows, updateOperationFunc func, v
|
||||
for(it=_operations->begin(); it!=_operations->end(); it++)
|
||||
{
|
||||
func (&(*it), params);
|
||||
_kiss->UpdateOperation(*it);
|
||||
if (_databaseSynchronization)
|
||||
_kiss->UpdateOperation(*it);
|
||||
}
|
||||
}
|
||||
|
||||
DeleteRows(1, GetNumberRows()-1);
|
||||
|
||||
LoadOperations(_operations, false, false, 0, 0);
|
||||
LoadOperations(_operations, 0, 0);
|
||||
|
||||
Layout();
|
||||
|
||||
|
||||
@@ -71,11 +71,11 @@ private:
|
||||
wxWindow* _parent;
|
||||
KissCount* _kiss;
|
||||
bool _displayLines;
|
||||
bool _canAddOperation, setWeek;
|
||||
bool _canAddOperation, _setWeek;
|
||||
bool _databaseSynchronization;
|
||||
wxString* _categories, *_accounts;
|
||||
std::vector<Operation>* _operations;
|
||||
bool _canAddOperation, _loadOperations;
|
||||
bool _loadOperations;
|
||||
int _curMonth, _curYear;
|
||||
|
||||
void SetWeek(int week, int line);
|
||||
|
||||
Reference in New Issue
Block a user