Account/Category modification are immediatly reported in other panels
This commit is contained in:
parent
ac7deb340c
commit
2e468c14b4
|
@ -33,6 +33,14 @@ struct Category
|
||||||
QString font;
|
QString font;
|
||||||
bool fix_cost;
|
bool fix_cost;
|
||||||
|
|
||||||
|
bool operator() (const Category& cat1, const Category& cat2) const
|
||||||
|
{
|
||||||
|
if (cat1.fix_cost) return true;
|
||||||
|
if (cat2.fix_cost) return false;
|
||||||
|
|
||||||
|
return cat1.name < cat2.name;
|
||||||
|
}
|
||||||
|
|
||||||
bool operator == (int catId)
|
bool operator == (int catId)
|
||||||
{
|
{
|
||||||
return id == catId;
|
return id == catId;
|
||||||
|
|
|
@ -45,6 +45,9 @@ void User::InvalidateOperations()
|
||||||
}
|
}
|
||||||
|
|
||||||
_operations.clear();
|
_operations.clear();
|
||||||
|
|
||||||
|
std::sort(_accounts.begin(), _accounts.end(), Account());
|
||||||
|
std::sort(_categories.begin(), _categories.end(), Category());
|
||||||
}
|
}
|
||||||
|
|
||||||
Category User::GetCategory(int catId)
|
Category User::GetCategory(int catId)
|
||||||
|
|
Loading…
Reference in New Issue