diff options
-rw-r--r-- | mybudget/src/lists/listscreen.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/mybudget/src/lists/listscreen.cpp b/mybudget/src/lists/listscreen.cpp index 4cc0eaf..dc68504 100644 --- a/mybudget/src/lists/listscreen.cpp +++ b/mybudget/src/lists/listscreen.cpp @@ -183,6 +183,16 @@ void ListScreen::loadCategory(const QString &category) void ListScreen::categoryUpdated(const QString &category) { updateModel(category); + + // To update the label when a new value is inserted + setTotalLabelValue(m_totals.value(category, 0)); + + /* + When a category is updated, we need to update the overall list too. + As the category argument here cames from the edited one, it will never + be "overall" because there is no edit mode for it. + */ + updateModel("overall"); } void ListScreen::updateModel(const QString &category) |