Add ascending/descending operation order in preferences
Remove default_preferences table Force date by default in SearchPanel Update TODO !! Add a generic UpdatePreference instead of SetLanguage, SetXXX into Database
This commit is contained in:
@@ -385,7 +385,7 @@ void AccountPanel::InsertOperation(User* user, Operation* op, int line, bool fix
|
||||
if (fix)
|
||||
_fixCosts++;
|
||||
|
||||
if (op)
|
||||
if (op && !fix)
|
||||
{
|
||||
for (it = _curOperations->begin(), curLine=1;
|
||||
it->fix_cost && it != _curOperations->end();
|
||||
@@ -736,8 +736,16 @@ void AccountPanel::OnOperationModified(wxGridEvent& event)
|
||||
{
|
||||
if ((*_curOperations)[i].fix_cost && !fix_op) continue;
|
||||
if (!(*_curOperations)[i].fix_cost && fix_op) break;
|
||||
if ((*_curOperations)[i].day > new_op.day)
|
||||
break;
|
||||
if (user->_preferences[wxT("operation_order")] == wxT("ASC"))
|
||||
{
|
||||
if ((*_curOperations)[i].day > new_op.day)
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((*_curOperations)[i].day < new_op.day)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
_curOperations->insert(_curOperations->begin()+i ,new_op);
|
||||
|
||||
Reference in New Issue
Block a user