[recipes] shopping: Avoid duplicates in the removed ingredients list
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [recipes] shopping: Avoid duplicates in the removed ingredients list
- Date: Thu, 18 May 2017 23:38:11 +0000 (UTC)
commit 9c5c02b00fe0cf7df596c5baea9af065690aa969
Author: Matthias Clasen <mclasen redhat com>
Date: Thu May 18 19:36:59 2017 -0400
shopping: Avoid duplicates in the removed ingredients list
We were not clearing this list before reconstructing it,
causing it to accumulate duplicates as the serves count
of a recipe is changed. Pointed out by Mohammed Sadiq.
src/gr-shopping-page.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/src/gr-shopping-page.c b/src/gr-shopping-page.c
index adbdd18..b89cc81 100644
--- a/src/gr-shopping-page.c
+++ b/src/gr-shopping-page.c
@@ -509,6 +509,7 @@ collect_ingredients (GrShoppingPage *page)
}
container_remove_all (GTK_CONTAINER (page->ingredients_list));
+ container_remove_all (GTK_CONTAINER (page->removed_list));
g_hash_table_iter_init (&iter, page->ingredients);
while (g_hash_table_iter_next (&iter, NULL, (gpointer *)&ing)) {
g_autofree char *unit = NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]