summaryrefslogtreecommitdiff
path: root/src/ui/widget.c
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-04-21 13:48:15 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-04-21 13:48:15 +0300
commit7fefd2ca4f1be52c1bef3bc87cc8972a57cab396 (patch)
tree111a6a295072eb89ab49d21add9e44e496447733 /src/ui/widget.c
parentbbbbc8e18879a5495be1cff78ca78be7a44ac25b (diff)
Mobile: Autoreload intervals are missing
Diffstat (limited to 'src/ui/widget.c')
-rw-r--r--src/ui/widget.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/ui/widget.c b/src/ui/widget.c
index 431d93c2..2048867d 100644
--- a/src/ui/widget.c
+++ b/src/ui/widget.c
@@ -1161,12 +1161,18 @@ iAny *insertChildAfter_Widget(iWidget *d, iAnyObject *child, size_t afterIndex)
1161 iAssert(!widget->parent); 1161 iAssert(!widget->parent);
1162 iAssert(d->children); 1162 iAssert(d->children);
1163 iAssert(afterIndex < size_ObjectList(d->children)); 1163 iAssert(afterIndex < size_ObjectList(d->children));
1164 iBool wasInserted = iFalse;
1164 iForEach(ObjectList, i, d->children) { 1165 iForEach(ObjectList, i, d->children) {
1165 if (afterIndex-- == 0) { 1166 if (afterIndex-- == 0) {
1166 insertAfter_ObjectList(d->children, i.value, child); 1167 insertAfter_ObjectList(d->children, i.value, child);
1168 wasInserted = iTrue;
1167 break; 1169 break;
1168 } 1170 }
1169 } 1171 }
1172 if (!wasInserted) {
1173 /* Someone is confused about the number of children? We still have to add this. */
1174 pushBack_ObjectList(d->children, child);
1175 }
1170 widget->parent = d; 1176 widget->parent = d;
1171 return child; 1177 return child;
1172} 1178}