From 238e19d77f2c8add083e8b5582664881f621c016 Mon Sep 17 00:00:00 2001 From: Joel Bodenmann Date: Sat, 21 May 2016 17:39:38 +0200 Subject: [PATCH] Fixing bug where the list item count wasn't decremented when an item was removed --- docs/releases.txt | 1 + src/gwin/gwin_list.c | 1 + 2 files changed, 2 insertions(+) diff --git a/docs/releases.txt b/docs/releases.txt index 8d720fe0..ad94b60c 100644 --- a/docs/releases.txt +++ b/docs/releases.txt @@ -3,6 +3,7 @@ ***************************************************************************** *** Changes after 2.5 *** +FIX: Fixing bug where the list item count wasn't decremented when an item was removed *** Release 2.5 *** diff --git a/src/gwin/gwin_list.c b/src/gwin/gwin_list.c index f0bd7362..494d2de9 100644 --- a/src/gwin/gwin_list.c +++ b/src/gwin/gwin_list.c @@ -485,6 +485,7 @@ void gwinListItemDelete(GHandle gh, int item) { if (i == item) { gfxQueueASyncRemove(&gh2obj->list_head, (gfxQueueASyncItem*)qi); gfxFree((void *)qi); + gh2obj->cnt--; if (gh2obj->top >= item && gh2obj->top) gh2obj->top--; _gwinUpdate(gh);