Do not reload current panel when a modification is done (but reload other ones) Add a method to KissPanel for reload other panels avoiding directly using _wxUI member

This commit is contained in:
Grégory Soutadé
2017-10-29 18:21:54 +01:00
committed by Grégory Soutadé
parent 0b096d88bd
commit 258a3eb48d
9 changed files with 69 additions and 47 deletions

View File

@@ -138,8 +138,6 @@ void KissCount::UpdateOperation(Operation& op, bool checkTransfert)
accountAmount = _db->CalcAccountAmount(op.account, op.month, op.year, 0);
_db->SetAccountAmount(op.account, op.month, op.year, accountAmount);
}
_wxUI->NeedReload();
}
int KissCount::AddOperation(Operation& op, bool checkTransfert)
@@ -156,8 +154,6 @@ int KissCount::AddOperation(Operation& op, bool checkTransfert)
_db->SetAccountAmount(op.account, op.month, op.year, accountAmount);
}
_wxUI->NeedReload();
return ret;
}
@@ -178,8 +174,6 @@ void KissCount::DeleteOperation(Operation& op)
accountAmount = _db->CalcAccountAmount(op.account, op.month, op.year, 0);
_db->SetAccountAmount(op.account, op.month, op.year, accountAmount);
}
_wxUI->NeedReload();
}
void KissCount::DeleteOperations(int month, int year)
@@ -193,7 +187,6 @@ void KissCount::DeleteOperations(int month, int year)
delete _user->_operations[year];
_user->_operations.erase(year);
}
_wxUI->NeedReload();
}
int KissCount::MetaAmount(int id)