aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoel Bodenmann <joel@embedded.pro>2016-05-21 17:39:38 +0200
committerJoel Bodenmann <joel@embedded.pro>2016-05-21 17:39:38 +0200
commit238e19d77f2c8add083e8b5582664881f621c016 (patch)
tree92c753e9735a7b71ffd870da9dd27fbff78f4f82
parent78e6f40cac12423f964d71dd91cd46ed46b6106d (diff)
downloaduGFX-238e19d77f2c8add083e8b5582664881f621c016.tar.gz
uGFX-238e19d77f2c8add083e8b5582664881f621c016.tar.bz2
uGFX-238e19d77f2c8add083e8b5582664881f621c016.zip
Fixing bug where the list item count wasn't decremented when an item was removed
-rw-r--r--docs/releases.txt1
-rw-r--r--src/gwin/gwin_list.c1
2 files changed, 2 insertions, 0 deletions
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);