Fix a bug in RemoveMeta

This commit is contained in:
Grégory Soutadé 2010-10-02 10:03:24 +02:00
parent 7dfe4bdb18
commit 135e702eb1

View File

@ -448,6 +448,7 @@ void GridAccount::RemoveMeta(Operation* op, int line, bool removeRoot, bool dele
else else
{ {
DeleteRows(line+1, 1); DeleteRows(line+1, 1);
if (_displayedOperations[line+1]->fix_cost) _fixCosts--;
_displayedOperations.erase(_displayedOperations.begin()+line+1); _displayedOperations.erase(_displayedOperations.begin()+line+1);
if (deleteOp) if (deleteOp)
{ {
@ -462,6 +463,7 @@ void GridAccount::RemoveMeta(Operation* op, int line, bool removeRoot, bool dele
if (removeRoot) if (removeRoot)
{ {
DeleteRows(line, 1); DeleteRows(line, 1);
if (_displayedOperations[line]->fix_cost) _fixCosts--;
_displayedOperations.erase(_displayedOperations.begin()+line); _displayedOperations.erase(_displayedOperations.begin()+line);
if (deleteOp) if (deleteOp)
{ {