[recipes/recipes-1.0] shopping: Avoid duplicates in the removed ingredients list



commit f826d8f7396ac7270bb5988b1f53ff2aef8a110b
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]